Read, store and compare game sequence?

I'm working on a very simple gamebox. Basically from a hardware point there is four buttons (N,E,S,W) and a RGB led on a box. Press the buttons in exactly the right order 11 times you 'win', else you loose after pressing 11 times. The box shuts down after 11 buttons pressed. No indication if correct button is pressed until all 11 have been chosen and it is a fixed sequence. So it should be extremely simple, I thought! But I am lost. What would be the best code to do this? Suggestions appreciated. It is the mechanism for picking up the choice (=what button is pressed), to store that choice, and how to compare the sequence at the end that gives me trouble...

(The LED is used for ON indication (G) and confirmation that a button is pressed (G+B). If the 11 buttons are pressed in the right order I deliver code thru the LedB)

Code thinking until I ran out of ideas:

#include <LowPower.h>


int LedR = 2; //The pin of the red LED.
int LedG = 3; //The pin of the green LED.
int LedB = 4; //The pin of the blue LED.
int ButtonPinN = 5;
int ButtonPinE = 6;
int ButtonPinS = 7;
int ButtomPinW = 8;
int done = 0;
int action = 0;

boolean old_valN = LOW;
boolean old_valE = LOW;
boolean old_valS = LOW;
boolean old_valW = LOW;

int pause = 1000;
long lastMove = millis();

void setup()
{
  pinMode(LedR, OUTPUT);
  pinMode(LedG, OUTPUT);
  pinMode(LedB, OUTPUT);
  pinMode(ButtonPinN, INPUT_PULLUP);           // set pin to input
  pinMode(ButtonPinE, INPUT_PULLUP);           // set pin to input
  pinMode(ButtonPinS, INPUT_PULLUP);           // set pin to input
  pinMode(ButtonPinW, INPUT_PULLUP);           // set pin to input
  digitalWrite(LedG, HIGH);
  delay(1000);
  digitalWrite(LedG,LOW);
  delay(1000);
  digitalWrite(LedG,HIGH);
  delay(1000);
  digitalWrite(LedG,LOW);
  delay(1000);
  digitalWrite(LedG,HIGH);
  delay(100);


  
  //Start a new game.
  // newGame();
}

void loop()
{

  if(digitalRead(ButtonPinN) == HIGH && old_val == LOW)
  {}
    if(digitalRead(ButtonPinE) == HIGH && old_val == LOW)
  {}
    if(digitalRead(ButtonPinS) == HIGH && old_val == LOW)
  {}
    if(digitalRead(ButtonPinW) == HIGH && old_val == LOW)
  {}


old_valN = digitalRead(ButtonPin);
old_valE = digitalRead(ButtonPin);
old_valS = digitalRead(ButtonPin);
old_valW = digitalRead(ButtonPin);

how to compare the sequence at the end that gives me trouble...

Don't do it at the end, do it as you go along. Put the 4 button pin numbers in an array and the correct sequence of eleven button pin numbers in a second array.

Set a boolean variable to true then start reading inputs in a for loop working through the button pin array. When you detect that a button has become pressed compare it with the current pin number in the second array. If the pin numbers don't match set the boolean to false. Whether or not the guess was correct increment the index to the second array.

When you reach the end of the second array examine the boolean. If it is true the sequence was correct else it was wrong.

How can you reasonably expect to compare the current state of 4 pins to ONE previous value?

How can you determine the order that switches are pressed without considering time?

How can you determine the order that switches are pressed without considering time?

By putting them into an array in the order that they were pressed. The actual time that they were pressed does not matter unless you are working within an overall time limit.

Mattzzz:
I'm working on a very simple gamebox. Basically from a hardware point there is four buttons (N,E,S,W) and a RGB led on a box. Press the buttons in exactly the right order 11 times you 'win', else you loose after pressing 11 times. The box shuts down after 11 buttons pressed. No indication if correct button is pressed until all 11 have been chosen and it is a fixed sequence. So it should be extremely simple, I thought! But I am lost. What would be the best code to do this? Suggestions appreciated. It is the mechanism for picking up the choice (=what button is pressed), to store that choice, and how to compare the sequence at the end that gives me trouble...

(The LED is used for ON indication (G) and confirmation that a button is pressed (G+B). If the 11 buttons are pressed in the right order I deliver code thru the LedB)

Code thinking until I ran out of ideas:

So basically this "game is about: 11 button presses to win (11 buttons pressed in correct sequence. Or 11 button presses to lose (11 buttons pressed in wrong sequence.

I'd like to ask some questions about the game details:
No time limit? Or is there a time limit?
Same sequence every time the game is played? Or does the sequence change?

I'd simply create a function which returns a single char 'N' E' 'S or 'W' character each time a button is pressed and collect the buttons presses into a char array like:
char enteredSequence"NWSENNSSWES";
then you could simply compare the array against a correct sequence:

char correctSequence"WWSEWWSSWEE";

So what's the problem?

Creating a function which returns one out of four chars accordingsly to one out of four buttons pressed?