Exemple #1
0
 public void ApplyConfiguration(string configurationXml)
 {
     _gameConfig = new XmlSerializer<TankBlasterConfig>().Deserialize(configurationXml);
     _field = new Battlefield(_gameConfig.MapWidth, _gameConfig.MapHeight);
     _locationService = new LocationService(_field);
     _explosionService = new ExplosionService(_field, _gameConfig, _locationService);
     _botService = new BotService(_field, _gameConfig, _locationService);
 }
Exemple #2
0
 public BotService(Battlefield field, TankBlasterConfig config, LocationService locationService)
 {
     _field           = field;
     _gameConfig      = config;
     _locationService = locationService;
 }
 public ExplosionService(Battlefield field, TankBlasterConfig config, LocationService locationService)
 {
     _field = field;
     _locationService = locationService;
     _gameConfig = config;
 }