Hey guys, I was trying to make a game of some kind with 14 leds, a push button and a potentiometer .
the idea of this project is like the game chicken invaders where i placed 7 green leds in a row and in front of them 7 red leds . a red led is supposed to light up and you can scroll between the green ones and when a red and a green one are opposite each other you can press the button and then the red led which was lit would turn off.I wrote the whole code myself and everything worked perfectly except for the button and firing part.Here is the code and the problem is in the part in the end which has all the if's. The "if ((....=....)&&(...=...)){}" part means that if led no.1(for example)green and the button and led no.1 red are in the same state (high or low)the red led will turn off unless one has a different state.Please help me.
-Yusuf
P.S:the code can be downloaded in the link below