Пример #1
0
 private void SetWinningMove(byte m1, byte m2, byte m3, Player player)
 {
     State          = player == Player.X ? GameState.Xwin : GameState.Owin;
     WinningMove    = new TicTacToeMove[3];
     WinningMove[0] = new TicTacToeMove(player, m1);
     WinningMove[1] = new TicTacToeMove(player, m2);
     WinningMove[2] = new TicTacToeMove(player, m3);
 }
Пример #2
0
        private void SetWinningMove(byte m1, byte m2, byte m3, GameState state)
        {
            State = state;
            Player player = state == GameState.Xwin ? Player.X : Player.O;

            WinningMove    = new TicTacToeMove[3];
            WinningMove[0] = new TicTacToeMove(player, m1);
            WinningMove[1] = new TicTacToeMove(player, m2);
            WinningMove[2] = new TicTacToeMove(player, m3);
        }
Пример #3
0
 public UltimateTicTacToeMove(Player player, byte outerCell, byte innerCell)
 {
     OuterCell = outerCell;
     _move     = new TicTacToeMove(player, innerCell);
 }