Exemplo n.º 1
0
 internal static void CheckStatus(Board board, Player player)
 {
     switch (TicTacRules.isGameOver(board))
     {
         case GameStatus.GameOver:
             FireEndGame(string.Format("Jogador {0} venceu", player.ToString()), board);
             break;
         case GameStatus.DeuVelha:
             FireEndGame("Deu Velha", board);
             break;
         case GameStatus.Playing:
             FirePlayerChange(GetNextPlayer(player));
             break;
     }
 }
Exemplo n.º 2
0
 internal static void Restart(Player player, Board board)
 {
     jogadas = 0;
     currentPlayer = player;
     board.Restart();
 }
Exemplo n.º 3
0
 public static void FireEndGame(string message, Board board)
 {
     if (GameOver != null) GameOver(null, new GameOverArgs(message));
     board.Enabled = false;
 }