Files
robot_intelligence_final_pr…/ConsoleApp/Maps/MapFactory.cs
Brady Bodily d63066c150 Backup
Working through some localization stuff will probably be pretty fluid.
2020-12-14 16:08:59 -07:00

35 lines
918 B
C#

using System.Collections.Generic;
namespace ConsoleApp.Maps
{
public class MapFactory : IMapFactory
{
private int _defaultHeight;
private int _defaultWidth;
public int Height { get; protected set; }
public int Width { get; protected set; }
public int CellWidth { get; protected set; }
public Dictionary<string, IMap> Maps { get; }
public void GenerateMaps(int x, int y)
{
Width = x;
Height = y;
Maps.Add("SquareMap",new SquareMap(x, y));
Maps.Add("HexMap", new HexMap(x, y));
}
public MapFactory(IVehicle vehicle)
{
CellWidth = vehicle.Width/2;
_defaultHeight = 0;
_defaultWidth = 0;
Height = _defaultHeight;
Width = _defaultWidth;
Maps = new Dictionary<string, IMap>();
}
}
}