예제 #1
0
 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;
     }
 }
예제 #2
0
 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++;
     }
 }
예제 #3
0
 public void SetTicTacToe(TicTacToe ticTacToe)
 {
     this.ticTacToe = ticTacToe;
 }