Created Mine Map and ReactivePlanner
This commit is contained in:
@@ -4,7 +4,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using ConsoleApp.Maps;
|
||||
using ConsoleApp.PathPlanners;
|
||||
using ConsoleApp.Vehicle;
|
||||
using ConsoleApp.Sim;
|
||||
using HexCore;
|
||||
|
||||
namespace ConsoleApp
|
||||
@@ -16,20 +16,23 @@ namespace ConsoleApp
|
||||
|
||||
private int _cellWidth;
|
||||
private IPathPlanner _pathPlanner;
|
||||
private IMineMap _mineMap;
|
||||
private IReactivePathPlanner _reactivePathPlanner;
|
||||
|
||||
|
||||
public SimRunner(IMapFactory mapFactory, IVehicle vehicle, IPathPlanner pathPlanner)
|
||||
public SimRunner(IMapFactory mapFactory, IVehicle vehicle, IPathPlanner pathPlanner, IReactivePathPlanner reactivePathPlanner)
|
||||
{
|
||||
|
||||
_cellWidth = mapFactory.CellWidth;
|
||||
_mapFactory = mapFactory;
|
||||
_vehicle = vehicle;
|
||||
_pathPlanner = pathPlanner;
|
||||
_reactivePathPlanner = reactivePathPlanner;
|
||||
}
|
||||
|
||||
public void Run()
|
||||
{
|
||||
|
||||
_mineMap = _mapFactory.GetMineMap();
|
||||
SquareSimulation();
|
||||
HexSimulation();
|
||||
// while(!squareTask.IsCompleted && !hexTask.IsCompleted){Thread.Sleep(500);}
|
||||
@@ -41,6 +44,7 @@ namespace ConsoleApp
|
||||
var hexMap = _mapFactory.GetHexMap();
|
||||
_vehicle.CurrentHexCell = new Coordinate2D(0, 0, OffsetTypes.OddRowsRight);
|
||||
var optimalPath = _pathPlanner.GenerateOptimalHexPath(hexMap, _vehicle);
|
||||
var reactivePath = _reactivePathPlanner.ReactiveHexPath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user