예제 #1
0
        private void Init(IPlayer whitePlayer, IPlayer blackPlayer, Board board = null)
        {
            if (whitePlayer == null)
            {
                whitePlayer = new ComputerPlayer();
            }
            if (blackPlayer == null)
            {
                blackPlayer = new ComputerPlayer();
            }
            if (board == null)
            {
                board = new Board();
            }

            whitePlayer.PieceSymbol = "O";
            blackPlayer.PieceSymbol = "X";

            game = new Game(whitePlayer, blackPlayer, board);

            GameLoop();
        }