Ejemplo n.º 1
0
        public Interpreter(IBattleshipBoardService battleshipBoardService, IGamePlayBoardService gamePlayBoardService)
        {
            _battleshipBoardService = battleshipBoardService;
            _battleshipBoard        = _battleshipBoardService.GetBattleshipBoard();
            _gamePlayBoardService   = gamePlayBoardService;

            _inputValidator = new InputValidator(battleshipBoardService);
            _inputValidator.InputValidated += InputValidator_InputValidated;

            _gamePlay = new GamePlay(_gamePlayBoardService, _battleshipBoardService);
            _gamePlay.GamePlayCompleted += GamePlay_GamePlayCompleted;
        }
Ejemplo n.º 2
0
 public GamePlay(IGamePlayBoardService gamePlayBoardService, IBattleshipBoardService battleshipBoardService)
 {
     _gamePlayBoardService   = gamePlayBoardService;
     _battleshipBoardService = battleshipBoardService;
 }
Ejemplo n.º 3
0
 public InputValidator(IBattleshipBoardService battleshipBoardService)
 {
     _battleshipBoardService = battleshipBoardService;
     _battleshipBoard        = _battleshipBoardService.GetBattleshipBoard();
 }