Hello!
I am new to these forums, but I hope to become a more advanced programmer soon. Well I come here with a dilemma. I am writing a program that allows you to play Connect Four. Now my problem is I really can't think of a way for my program to check the buttons (I have buttons for each slot on the board) color and if four of the same color are connected, it displays a "Winner!" message. I was thinking of having a timer that with every tick checks, but I would have to put If And statements for every single possible winning combination... Not only would that take a while to code, but with it running that every second or so, I don't think the old computers my school uses would handle it very well. Does anyone know a possible way to do so?
I am new to these forums, but I hope to become a more advanced programmer soon. Well I come here with a dilemma. I am writing a program that allows you to play Connect Four. Now my problem is I really can't think of a way for my program to check the buttons (I have buttons for each slot on the board) color and if four of the same color are connected, it displays a "Winner!" message. I was thinking of having a timer that with every tick checks, but I would have to put If And statements for every single possible winning combination... Not only would that take a while to code, but with it running that every second or so, I don't think the old computers my school uses would handle it very well. Does anyone know a possible way to do so?