I am trying to code a simon Game on my FPGA, and I am a bit stuck at how i should create a pattern and detect it.
simon Game : http://www.freesimon.org/
My idea until now is, I create 99 states (99 because i am implementing 99 stages). And using a random generator(which is still missing) determine what LED should be lid for each state,
then using a if statement, I check if each state(Each LED are matched to a button) match the button thats being pressed. If they match, it then checks if the next buttompress match the next state and so on.
Everytime it goes to the next state, i compare the state value with the value of stages, and if states
Could this be done smarter in some way??