Esempio n. 1
0
 public void KeyPressed(KeyEventArgs e)
 {
     if (isOurTurnNow)
     {
         if (endGame)
         {
             if (controlKeyboard.isRestart(e))
             {
                 RestartGame();
             }
         }
         else
         if (everyoneIsReady)
         {
             if (controlKeyboard.keyPressedInGameMode(e, ourPlayer))
             {
                 isOurTurnNow       = false;
                 timesToWaitingTurn = timesToWaitingTurnMax;
             }
         }
         else
         {
             controlKeyboard.keyPressedInPrepareMode(e, ourPlayer);
         }
     }
 }
Esempio n. 2
0
 public void KeyPressed(KeyEventArgs e)
 {
     if (endGame)
     {
         if (controlKeyboard.isRestart(e))
         {
             RestartGame();
         }
     }
     else
     if (everyoneIsReady)
     {
         if (controlKeyboard.keyPressedInGameMode(e, activePlayer))
         {
             activePlayer = GetOtherPlayer(activePlayer);
         }
     }
     else
     {
         controlKeyboard.keyPressedInPrepareMode(e, activePlayer);
     }
 }