Пример #1
0
 //Loop waiting for player input. On a seperate thread so it can be killed when the game over state is
 //reached and it doesn't hang up the game state progression at the ReadKey().
 private void WaitForInput()
 {
     while (noWinner)
     {
         ConsoleKey keyPressed = Console.ReadKey(true).Key;
         leftPaddle.PaddleMove(keyPressed);
         rightPaddle.PaddleMove(keyPressed);
     }
 }