public void CheckGameStatus(TicTacToe ticTacToe) { SetTieIfGameEnded(ticTacToe); if (CheckIfSymbolWon(TicTacToeSymbol.Circle, ticTacToe.ticTacToeBoard)) { ticTacToe.GameStatus = GameStatus.BotWon; } if (CheckIfSymbolWon(TicTacToeSymbol.Cross, ticTacToe.ticTacToeBoard)) { ticTacToe.GameStatus = GameStatus.UserWon; } }
public void CheckGameStatusAndGivePoint(TicTacToe ticTacToe) { if (ticTacToe.GameStatus == GameStatus.Tie) { ticTacToe.TieScore++; } else if (ticTacToe.GameStatus == GameStatus.BotWon) { ticTacToe.BotScore++; } else if (ticTacToe.GameStatus == GameStatus.UserWon) { ticTacToe.UserScore++; } }
public void SetTicTacToe(TicTacToe ticTacToe) { this.ticTacToe = ticTacToe; }