Created Mine Map and ReactivePlanner

This commit is contained in:
2020-12-15 18:19:07 -07:00
parent 45eca3b572
commit 4edcef4664
24 changed files with 309 additions and 84 deletions

View File

@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
using ConsoleApp.Vehicle;
using ConsoleApp.Sim;
namespace ConsoleApp.Maps
{
@@ -17,16 +17,20 @@ namespace ConsoleApp.Maps
private ISquareMap _squareMap;
private IHexMap _hexMap;
private IMineMap _mineMap;
public void GenerateMaps(int x, int y)
public void GenerateMaps(int x, int y, double minePercentage)
{
Width = x;
Height = y;
_squareMap = new SquareMap(x, y);
_hexMap = new HexMap(x, y);
_mineMap = new MineMap(x, y, minePercentage);
}
public IHexMap GetHexMap() => _hexMap ?? throw new NullReferenceException("hex map not initialized");
public ISquareMap GetSquareMap() => _squareMap ?? throw new NullReferenceException("square map not initialized");
public IMineMap GetMineMap() => _mineMap ?? throw new NullReferenceException("mine map not initialized");
public MapFactory(IVehicle vehicle)
{