예제 #1
0
/**
 * Check state of the active game
 *
 * @param Ui      Pointer zu ui
 * @param QObject Clicked Object (Sender von Slot )
 */
void CTicTacToe::checkGameState(QObject *sender)
{
    if (!checkThreeInARow(sender))
    {
        if (hasFreeFields())
        {
            switchToNextPlayer();
        }
    }
}
예제 #2
0
void
Controller::Moderator::prepareNewTurn()
{
	switchToNextPlayer();
	pickNextTile();

	if ( mNextTile )
	{
		requestTilePlacement();
	}
	else
	{
		endGame();
	}
}