public ShipController( IAttacker attacker, IBoardCreator boardCreator, IShipCreator shipCreator, IShipPlacer shipPlacer) { _shipCreator = shipCreator; _shipPlacer = shipPlacer; }
public RobotPlayer(IBoardDrawer boardDrawer, IBattleField battleField, IShipPlacer shipPlacer) { _battleField = battleField; _shipPlacer = shipPlacer; _boardDrawer = boardDrawer; _exploratoryAttack = new ExploratoryAttack(battleField, shipPlacer); _afterHitAttack = new AfterHitAttack(battleField); _currentAttackMode = AttackMode.Exploratory; }
public ExploratoryAttack(IBattleField battleField, IShipPlacer shipPlacer) { _battleField = battleField ?? throw new ArgumentNullException(nameof(battleField)); _shipPlacer = shipPlacer ?? throw new ArgumentNullException(nameof(shipPlacer)); }
public SeaBattleGame(IShipGenerator randomShipGenerator, IShipPlacer shipPlacer) { this.randomShipGenerator = randomShipGenerator; this.shipPlacer = shipPlacer; ResetGrid(); }
public HumanPlayer(IBoardDrawer boardDrawer, IBattleField battleField, IShipPlacer shipPlacer) { _boardDrawer = boardDrawer ?? throw new ArgumentNullException(nameof(boardDrawer)); _battleField = battleField ?? throw new ArgumentNullException(nameof(battleField)); _shipPlacer = shipPlacer ?? throw new ArgumentNullException(nameof(shipPlacer)); }