Simon Says game - Coding help

Hi, I’m new, but since this is a project guidance folder. Can anyone help me with a project I’m working on(for school, it’s the final project)? This is what I’ve tried:

if ( buttonPin1, buttonPin2 == LOW) {} //I also tried the while command with logicaland here but still the same result

digitalWrite(redledPin, HIGH);
delay(250);
digitalWrite(redledPin, LOW);
delay(250);
digitalWrite(blueledPin, HIGH);
delay(250);
digitalWrite(blueledPin, LOW);
delay(250);
for (int i=0; i<10; i++) { //Have not put anything after this(for later levels).

What is the project? What is the problem? There is no question, no code to correct. Keep on coding.

Nightowl007:
if ( buttonPin1, buttonPin2 == LOW) {} //I also tried the while command with logical and here but still the same result

That "if" condition is wrong and there should be some code btwn the {}. Read up on logical "and" and "if" statements here: Arduino Reference - Arduino Reference

And while you are in the reference section, let your curiosity get the better of you and look around for more on what is available and how it all works.

Railroader:
What is the project? What is the problem? There is no question, no code to correct. Keep on coding.

Sorry for the confusion. The project i'm working on is to make a simon says game out of arduino. We've done some coding exercises that might work on the final project, but I can't piece them together. I'm posting up here to ask for help because my teammates also don't understand how to work this either, and I've already tried what my teacher recommend using(while statement that have the logicaland inside, which is still the same as the if statement i posted.

DaveEvans:
That "if" condition is wrong and there should be some code btwn the {}. Read up on logical "and" and "if" statements here: Arduino Reference - Arduino Reference

And while you are in the reference section, let your curiosity get the better of you and look around for more on what is available and how it all works.

Thank you for the reply, I'll check it out.

Realistically I would code it to loop using millis().

Been awhile since I played the game, but it’s time based, and at least seemingly the pace speed up as you got further and further into the sequence.

Here is my secret, when you initialize the game, set an random array for the whole game at the beginning. What was it 16 “moves” to win?

That way you don’t have to worry about building the sequence up each turn. You simply loop through your already created array for showing the pattern and for making sure the user follows the pattern.

Slumpert:
Realistically I would code it to loop using millis().

Been awhile since I played the game, but it’s time based, and at least seemingly the pace speed up as you got further and further into the sequence.

Here is my secret, when you initialize the game, set an random array for the whole game at the beginning. What was it 16 “moves” to win?

That way you don’t have to worry about building the sequence up each turn. You simply loop through your already created array for showing the pattern and for making sure the user follows the pattern.

he said the payers will have 10 levels, and if he/she couldn't guess for three times of that pattern, then it'll flash several times and then reset.