Simon Game

Hi all,
I’m working on the classic simon game. (SIMPLE SIMPLE version)
I’m having a couple of problems:
(1) the “random ()” numbers don’t seem to vary much in patterns written in my “order” (below)
(2) when I get to the third round I get my failure indicator, but I don’t know why…

int LED1 = 7;
int button1 = 3;
int LED2 = 6;
int button2 = 2;
int LED3 = 5;
int button3 = 1;
int LED4 = 4;
int button4 = 0;
int LED[] = {LED1, LED2, LED3, LED4};
int buttons[] = {button1, button2, button3, button4};
boolean fail = false;

void setup () {
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
  pinMode(LED3, OUTPUT);
  pinMode(LED4, OUTPUT);
  pinMode(button1, INPUT);
  pinMode(button2, INPUT);
  pinMode(button3, INPUT);
  pinMode(button4, INPUT);
}

void loop () {
int order[] = {random(0, 3), random(0, 3), random(0, 3), random(0, 3)};
for (int gameReps = 0; gameReps < 4; gameReps++) {
  int properOrder = 0;
  for (int blinkReps = 0; blinkReps <= gameReps; blinkReps++) {
    digitalWrite(LED[order[properOrder]], HIGH);
    delay(500);
    digitalWrite(LED[order[properOrder]], LOW);
    delay(500);
    properOrder++;
   }
   properOrder = 0;
   for (int buttonReps = 0; buttonReps <= gameReps; buttonReps++) {
     while (digitalRead(button1) == HIGH && digitalRead(button2) == HIGH && digitalRead(button3) == HIGH && digitalRead(button4) == HIGH) {
       delay(1);
     }
     if (digitalRead(buttons[order[properOrder]]) == LOW) {
       digitalWrite(LED[order[properOrder]], HIGH);
       delay(500);
       digitalWrite(LED[order[properOrder]], LOW);
       delay(500);
     }
//Failure indicator here:
     else {
       digitalWrite(LED1, HIGH);
       digitalWrite(LED2, HIGH);
       digitalWrite(LED3, HIGH);
       digitalWrite(LED4, HIGH);
       delay(2000);
       digitalWrite(LED1, LOW);
       digitalWrite(LED2, LOW);
       digitalWrite(LED3, LOW);
       digitalWrite(LED4, LOW);
       fail = true;
       break;
     }
     if (fail == true) {break;}
  }
  if (fail == true) {break;}
  delay(1000);
}
}

I appreciate any help! :)

(1) the "random ()" numbers don't seem to vary much in patterns written in my "order[]" (below)

Look at using:- http://www.arduino.cc/en/Reference/RandomSeed

Quite a few of these about at the moment, is it a class assignment?

additional, to seed as random as possible you might use the time needed for the user to press the first key as seed. - use time in micros() -

Quite a few of these about at the moment, is it a class assignment?

I don't understand your question? :s