public PathTimeMachine(int[,] map, GameProps gameProps) { _map = map; _gameProps = gameProps; _weightedMap = new Node[_gameProps.Width, _gameProps.Height]; BuildWeightedMap(); }
public GameController(IConsole console) { _console = console; string[] inputs; inputs = _console.ReadLine().Split(' '); _gameProps = new GameProps { Width = int.Parse(inputs[0]), Height = int.Parse(inputs[1]), MyId = int.Parse(inputs[2]) }; _console.Debug(_gameProps); _mapScanner = new MapScanner(_gameProps, _console); _navigator = new PreComputedSpiralNavigator(_mapScanner, _console, reversedModeOn: true, _gameProps); var headPositionReducer = new HeadPositionReducer(_gameProps, _mapScanner); _enemyTracker = new EnemyTracker(_gameProps, _mapScanner.GetMapOrScan(), console, headPositionReducer); var torpedoController = new AttackController(_gameProps, _enemyTracker, _mapScanner, _console, headPositionReducer, _navigator); var chargeController = new ChargeController(_enemyTracker); _submarine = new Submarine(_navigator, _enemyTracker, _console, torpedoController, chargeController); _submarine.Start(); }