Ejemplo n.º 1
0
void MainWindow::onMoveWasMade(const Grid *newMove)
 {
#ifdef DEBUG_VIEW
    print("mainWindow->onMoveWasMade");
#endif
    switchCurrentPlayer();
    emit validMove(newMove);
 }
Ejemplo n.º 2
0
void Game::prepareNextMoveRequest()
{
    switchCurrentPlayer();
    GameResult result;
    if (GameResult::ONGOING != (result = gameStateIndicator_->indicateGameEnd(
        gameState_->currentPlayer, gameState_->currentBoard)))
    {
        endGame(result);
        return;
    }
    requestMove();
}