示例#1
0
 public Engine(IGridCreator gridCreator, ITargetStrategy targetStrategy, IConfigService configService, ILogger <Engine> logger)
 {
     _gridCreator    = gridCreator;
     _targetStrategy = targetStrategy;
     _configService  = configService;
     _logger         = logger;
 }
示例#2
0
 public Player(IGridCreator gridCreator, ITargetStrategy _targetStrategy, int gridSize, IEnumerable <ShipPrototype> ships, string playerName)
 {
     targetStrategy = _targetStrategy;
     PlayerGrid     = gridCreator.Create(GridType.Main, gridSize, ships);
     OpponentGrid   = gridCreator.Create(GridType.Opponent, gridSize);
     Name           = playerName;
 }
 private void CreateInstances()
 {
     _primeGenerator = new PrimeGenerator();
     _rowCreator     = new RowCreator(_primeGenerator);
     _gridCreator    = new GridCreator(_rowCreator);
 }
示例#4
0
 public MainController(IOutput output, IGridCreator gridCreator)
 {
     _output      = output;
     _gridCreator = gridCreator;
 }
示例#5
0
 public Application(IGridCreator gridCreator)
 {
     _gridCreator = gridCreator;
 }