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); } } }
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); } }