i know, i was working to fix that. here is what i have now and it is even more buggy:
#include <SPI.h>
#include <Servo.h>
Servo myservo;
const int MAX_PAGENAME_LEN = 8;
char buffer[MAX_PAGENAME_LEN + 1];
void setup()
{
randomSeed(analogRead(0));
Serial.begin(9600);
myservo.attach(9);
delay(1000);
}
void loop()
{
const int x=createroomRight();
const int y=createroomStraight();
int array[x][y];
for (int i = 0; i < y; i++) {
int u = 0;
for (int p = 0; p < x; p++) {
array[i][p] = 0;
}
}
Serial.println("starting");
for (int p = 0; p < y; p++) {
for (int i = 0; i < x; i++) {
Serial.print(array[i][p]);
Serial.print("|");
}
Serial.println();
}
array[0][1] = 9;
array[1][3] = 8;
Serial.println("start mid");
for (int p = 0; p < y; p++) {
for (int i = 0; i < x; i++) {
Serial.print(array[i][p]);
Serial.print("|");
}
Serial.println();
}
}
int createroomRight() { //test
int j = random(1, 50); //pointing left
int i = random(1, 50); //pointing straight
int u = random(1, 50); //pointing up
int q = random(1, 50); //pointing down
int l = random(1, 50); //pointing straight
int h = random(1, 50); //pointing right
int depth = u + h;
int height = i + l;
int width = j + h;
return width;
}
int createroomStraight() { //test
int j = random(1, 50); //pointing left
int i = random(1, 50); //pointing straight
int u = random(1, 50); //pointing up
int q = random(1, 50); //pointing down
int l = random(1, 50); //pointing straight
int h = random(1, 50); //pointing right
int depth = u + h;
int height = i + l;
int width = j + h;
return height;
}