예제 #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);
 }
예제 #2
0
 public BotService(Battlefield field, TankBlasterConfig config, LocationService locationService)
 {
     _field           = field;
     _gameConfig      = config;
     _locationService = locationService;
 }
예제 #3
0
 public ExplosionService(Battlefield field, TankBlasterConfig config, LocationService locationService)
 {
     _field = field;
     _locationService = locationService;
     _gameConfig = config;
 }