public SimulationResult SetupForSingleUnit(uint pId)
        {
            var mapper = new SimulationResultMapper();
            var units  = new List <Unit>();
            var unit   = new Unit()
            {
                Id           = 1,
                PositionsLog = new List <PositionLog>()
            };

            units.Add(unit);
            unit.PositionsLog.Add(new PositionLog(0, 0, 0, 0));
            unit.PositionsLog.Add(new PositionLog(0, 1, 1, 1));
            unit.PositionsLog.Add(new PositionLog(1, 2, 2, 0));
            unit.PositionsLog.Add(new PositionLog(1, 2, 3, 1));
            unit.PositionsLog.Add(new PositionLog(2, 3, 3, 0));

            var result = mapper.MapToSimulationResult(units, pId, 3, new Map()
            {
                InitialX = 5, InitialY = 5, MaxX = 10, MaxY = 10
            });

            return(result);
        }
예제 #2
0
 public SimulationLogic(SimulationResultMapper simulationResultMapper)
 {
     _simulationResultMapper = simulationResultMapper;
 }