I am working on a game on my Arduino UNO and have no idea of how to program it at all. I have attached a photo of what the setup looks like on my breadboard. What I ultimately want is for it to be like a game of Pong. I want either LED 2 or LED 3 to turn on. By either, I mean it chooses a random one to set HIGH. Then it turns that one off and moves over to LEDs 4 and 5 and turns on a random one of those on. Then over to LEDs 6 and 7 and lights a random one of those. Once at the end, I want one of the yellow LEDs to be lit. However, lets say that the code gets to LEDs 6 and 7 and that LED6 was chosen by the random function. I want LED 8 to be lit before the program continues. I would like LEDs 0 and 8 to constantly be lit unless the button above it turns it off and turns the other Yellow LED on. So if LED 6 is lit and LED 8 is not, I want the speaker to give like a “YOU LOSE” type of tone. So LEDs 0 and 8 will like be the default LEDs always lit unless the button above turns it off. I want Button 1 to control LEDs 0 and 1, and Button 2 to control LEDs 8 and 9. In visa versa, if LED7 was chosen by the random function, then a button press to turn on LED 9 would be required for the code to continue. So back to the earlier part about once it gets to the end, if the correct LED was lit then it starts moving the other way and does the same thing once it gets to that end. I want the game to get increasingly harder via the time interval between lighting LEDs getting lower as to make it harder to make the right Button press in time.
However, I do not want someone to just give me the code I need to download, unless they give a very detailed explanation of what each part of the code is doing and why it’s necessary. I would preferably like programming ideas and how those ideas should work. A guidance is the word I am looking for.