Пример #1
0
        public Game([Named("playerOne")] IPlayerAgent playerOne, [Named("playerTwo")] IPlayerAgent playerTwo)
        {
            _playerOne = playerOne;
            _playerTwo = playerTwo;
            _gameBoard = new GameBoard();

            _playerOneAdapter = new PlayerBoardAdapter(_gameBoard, BoardField.One);
            _playerTwoAdapter = new PlayerBoardAdapter(_gameBoard, BoardField.Two);
        }
Пример #2
0
 public PlayerBoardAdapter(GameBoard gameBoard, BoardField player)
 {
     _player = player;
     _gameBoard = gameBoard;
 }