We then implemented a specific function to compare the 2 sequences together, and called all 3 functions consecutively in the loop.
To solve this, we put the random sequence generation into its own function, as well as the input sequence. The reed switch module was simple, but showing the player the sequence and then waiting for an input proved to be a challenge. The most challenging part of this project was integrating the different aspects together. If the color in the original sequence was not equal to the color in the imputed sequence, and if statement would set a boolean to false, and a if statement located at the top of the loop() would check at the beginning of each round if the player had lost the previous round, and would stop the game. Once we had a system of arrays successfully implemented, it was a matter of creating a set or for looks and if statements to index each array and compare them. The way the game determines if you were successful in matching the original sequence is by comparing the 2 arrays together.
We decided to create 2 separate arrays, one of the correct sequence, and another of the player's imputed sequence. We realized that we could simulate this with joystick movements, and then set to work on developing the game logic.
The first thing that came to mind was the Simon Says game, which flashes a sequence of lights and then has the player repeat the sequence on a series of buttons. When we saw the joystick module, we immediately thought of a project that included a 4 directional aspect.