I think I'm at a conundrum here, I've creating a matching game in C# winforms. And I'm 90% done, the only thing left is the game loop.
The matching games consits of two multidimensional arrrays which are panels. And after I set everything up, I can RunGame(), which where my game loop is, the problem I am having is getting input. I'm not sure how to do that yet.
For example.
It's a while loop.
So,
while(game.isRunning()){
//get input from player.
//getchoice then redraw panels accordingly
//get input from player 2.
//getchoice then redraw panels accordingly
}
The problem is my players click on panels that's how I get the choice they've made. So I wanted to know if you guys have any good ways of getting input in a loop from an event that will be launched outside the loop for a game.
Thanks.