Added detector info

This commit is contained in:
2020-12-10 21:18:15 -07:00
parent 3fee402da1
commit 2c5f0b73b9
12 changed files with 112 additions and 34 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -7,9 +7,12 @@
<e p="Bootstrapper.cs" t="Include" />
<e p="ConsoleApp.csproj" t="IncludeRecursive" />
<e p="CoreModule.cs" t="Include" />
<e p="IJsonDeserializor.cs" t="Include" />
<e p="IModule.cs" t="Include" />
<e p="ISimRunner.cs" t="Include" />
<e p="IUserConsole.cs" t="Include" />
<e p="IVehicle.cs" t="Include" />
<e p="JsonDeserializor.cs" t="Include" />
<e p="Maps" t="Include">
<e p="Direction.cs" t="Include" />
<e p="Heading.cs" t="Include" />
@@ -36,6 +39,9 @@
<e p="Program.cs" t="Include" />
<e p="SimRunner.cs" t="Include" />
<e p="UserConsole.cs" t="Include" />
<e p="Vehicle.cs" t="Include" />
<e p="VehicleConfiguration.cs" t="Include" />
<e p="VehicleConfiguration.json" t="Include" />
</e>
<e p="packages" t="ExcludeRecursive" />
<e p="RobotIntelFinal.sln" t="IncludeFlat" />

View File

@@ -15,25 +15,30 @@
</component>
<component name="ChangeListManager">
<list default="true" id="dafcaeb7-80aa-43a3-a480-786fafb78c0b" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/ConsoleApp/IJsonDeserializor.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/ConsoleApp/IVehicle.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/ConsoleApp/JsonDeserializor.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/ConsoleApp/Vehicle.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/ConsoleApp/VehicleConfiguration.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/ConsoleApp/VehicleConfiguration.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.RobotIntelFinal/.idea/contentModel.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.RobotIntelFinal/.idea/contentModel.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.RobotIntelFinal/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.RobotIntelFinal/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/Maps/HexCell.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/Maps/HexCell.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/Maps/HexMap.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/Maps/HexMap.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/Maps/ICell.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/Maps/ICell.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/Maps/IHexMap.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/Maps/IHexMap.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/Maps/IMap.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/Maps/IMap.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/Maps/IMapFactory.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/Maps/IMapFactory.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/Maps/ISquareCell.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/Maps/ISquareCell.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/Maps/ISquareMap.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/Maps/ISquareMap.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/Maps/MapFactory.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/Maps/MapFactory.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/Maps/SquareCell.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/Maps/SquareCell.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/Maps/SquareMap.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/Maps/SquareMap.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/ConsoleApp.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/ConsoleApp.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/CoreModule.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/CoreModule.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/SimRunner.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/SimRunner.cs" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="JSON File" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
@@ -57,10 +62,8 @@
<option value="$PROJECT_DIR$/ConsoleApp/IMapFactory.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Bootstrapper.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/ISimRunner.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/SimRunner.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/UserConsole.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Program.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/CoreModule.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/IMapManager.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/Direction.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/Heading.cs" />
@@ -77,6 +80,14 @@
<option value="$PROJECT_DIR$/ConsoleApp/Maps/ISquareCell.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/MapFactory.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/HexMap.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/VehicleConfiguration.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/JsonDeserializor.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/IJsonDeserializor.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/CoreModule.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Vehicle.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/IVehicle.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/SimRunner.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/VehicleConfiguration.json" />
</list>
</option>
</component>
@@ -146,7 +157,7 @@
<workItem from="1607286402206" duration="6845000" />
<workItem from="1607640133651" duration="318000" />
<workItem from="1607640470920" duration="58000" />
<workItem from="1607640550443" duration="9566000" />
<workItem from="1607640550443" duration="11201000" />
</task>
<servers />
</component>
@@ -171,30 +182,34 @@
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
</component>
<component name="WindowStateProjectService">
<state width="1158" height="563" key="GridCell.Tab.0.bottom" timestamp="1607657316327">
<state width="1158" height="563" key="GridCell.Tab.0.bottom" timestamp="1607658943689">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="581" key="GridCell.Tab.0.bottom/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607641515103" />
<state width="1158" height="563" key="GridCell.Tab.0.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657316327" />
<state width="1158" height="563" key="GridCell.Tab.0.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657415855" />
<state width="1158" height="581" key="GridCell.Tab.0.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607641379864" />
<state width="1158" height="563" key="GridCell.Tab.0.center" timestamp="1607657316326">
<state width="1158" height="563" key="GridCell.Tab.0.bottom/0.25.1440.875/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607658943689" />
<state width="1158" height="563" key="GridCell.Tab.0.center" timestamp="1607658943688">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="581" key="GridCell.Tab.0.center/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607641515101" />
<state width="1158" height="563" key="GridCell.Tab.0.center/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657316326" />
<state width="1158" height="563" key="GridCell.Tab.0.center/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657415853" />
<state width="1158" height="581" key="GridCell.Tab.0.center/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607641379862" />
<state width="1158" height="563" key="GridCell.Tab.0.left" timestamp="1607657316325">
<state width="1158" height="563" key="GridCell.Tab.0.center/0.25.1440.875/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607658943688" />
<state width="1158" height="563" key="GridCell.Tab.0.left" timestamp="1607658943687">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="581" key="GridCell.Tab.0.left/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607641515100" />
<state width="1158" height="563" key="GridCell.Tab.0.left/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657316325" />
<state width="1158" height="563" key="GridCell.Tab.0.left/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657415853" />
<state width="1158" height="581" key="GridCell.Tab.0.left/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607641379861" />
<state width="1158" height="563" key="GridCell.Tab.0.right" timestamp="1607657316326">
<state width="1158" height="563" key="GridCell.Tab.0.left/0.25.1440.875/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607658943687" />
<state width="1158" height="563" key="GridCell.Tab.0.right" timestamp="1607658943688">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="581" key="GridCell.Tab.0.right/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607641515102" />
<state width="1158" height="563" key="GridCell.Tab.0.right/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657316326" />
<state width="1158" height="563" key="GridCell.Tab.0.right/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657415854" />
<state width="1158" height="581" key="GridCell.Tab.0.right/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607641379863" />
<state width="1158" height="563" key="GridCell.Tab.0.right/0.25.1440.875/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607658943688" />
<state width="1158" height="716" key="GridCell.Tab.1.bottom" timestamp="1607657084436">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>

View File

@@ -9,4 +9,10 @@
<PackageReference Include="DryIoc.dll" Version="4.5.2" />
</ItemGroup>
<ItemGroup>
<None Update="VehicleConfiguration.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View File

@@ -1,3 +1,4 @@
using System.Text.Json;
using System.Threading;
using ConsoleApp.Maps;
using DryIoc;
@@ -10,6 +11,8 @@ namespace ConsoleApp
{
container.Register<IMapFactory, MapFactory>(Reuse.Singleton);
container.Register<ISimRunner, SimRunner>(Reuse.Singleton);
container.Register<IVehicle, Vehicle>(Reuse.Singleton);
container.Register<IJsonDeserializor, JsonDeserializor>(Reuse.Singleton);
}

View File

@@ -1,4 +1,7 @@
$HEADER$namespace $NAMESPACE$
namespace ConsoleApp
{
public interface $INTERFACE$ {$END$}
public interface IJsonDeserializor
{
T DeserializeObject<T>(string filePath);
}
}

View File

@@ -1,4 +1,9 @@
$HEADER$namespace $NAMESPACE$
namespace ConsoleApp
{
public interface $INTERFACE$ {$END$}
public interface IVehicle
{
int Length { get; }
int Width { get; }
int DetectorWidth { get; }
}
}

View File

@@ -1,4 +1,15 @@
$HEADER$namespace $NAMESPACE$
using System;
using System.IO;
using System.Text.Json;
namespace ConsoleApp
{
public class $CLASS$ {$END$}
public class JsonDeserializor : IJsonDeserializor
{
public T DeserializeObject<T>(string filePath)
{
var jString = File.ReadAllText(filePath);
return JsonSerializer.Deserialize<T>(jString);
}
}
}

View File

@@ -6,7 +6,7 @@ namespace ConsoleApp
{
private IMapFactory _mapFactory;
public SimRunner(IMapFactory mapFactory)
public SimRunner(IMapFactory mapFactory, IVehicle vehicle)
{
_mapFactory = mapFactory;
}

View File

@@ -1,4 +1,24 @@
$HEADER$namespace $NAMESPACE$
using System;
namespace ConsoleApp
{
public class $CLASS$ {$END$}
public class Vehicle : IVehicle
{
public int Length { get; }
public int Width { get; }
public int DetectorOffset { get;}
public int DetectorWidth { get;}
public Vehicle(IJsonDeserializor jsonDeserializor)
{
var config = jsonDeserializor.DeserializeObject<VehicleConfiguration>("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/VehicleConfiguration.json");
Length = config.Length;
Width = config.Width;
DetectorWidth = config.DetectorWidth;
DetectorOffset = config.DetectorOffset;
}
}
}

View File

@@ -1,4 +1,10 @@
$HEADER$namespace $NAMESPACE$
namespace ConsoleApp
{
public class $CLASS$ {$END$}
public class VehicleConfiguration
{
public int Length { get; set; }
public int Width { get; set; }
public int DetectorWidth { get; set; }
public int DetectorOffset { get; set; }
}
}

View File

@@ -1,3 +1,6 @@
{
"Length": 3,
"Width": 2,
"DetectorWidth": 3,
"DetectorOffset": 1
}