Exemplo n.º 1
0
        public GameManager(MapSettings mapSettings, IEnumerable <IBot> bots)
        {
            _settings = mapSettings;
            _mapModel = new Map(_settings.Id, _settings.Width, _settings.Height, _settings.Walls.ToList(), _settings.Traps.ToList());
            _map      = new MapManager(_settings);

            AddBots(bots);
            CreateStep();
        }
Exemplo n.º 2
0
 public BotManager(IBot bot,
                   int x,
                   int y,
                   MapSettings mapSettings,
                   Game game)
 {
     _iBot     = bot;
     _settings = mapSettings;
     X         = x;
     Y         = y;
     Power     = _settings.InitialPower;
     DistributePower(game);
 }
Exemplo n.º 3
0
        internal MapManager(MapSettings mapSettings)
        {
            _settings = mapSettings;

            _points = new List <IMapObject> [_settings.Width, _settings.Height];

            for (var x = 0; x < _settings.Width; x++)
            {
                for (var y = 0; y < _settings.Height; y++)
                {
                    _points[x, y] = new List <IMapObject>();
                }
            }

            // Add walls to the map
            AddRange(_settings.Walls);
            // Add traps to the map
            AddRange(_settings.Traps);
            // Add bonuses to the map
            AddRange(_settings.Bonuses);
        }