Maps are more generic as well as cells.

This commit is contained in:
2020-12-10 20:34:45 -07:00
parent 7f0cb10198
commit d725372ffb
14 changed files with 121 additions and 94 deletions

View File

@@ -11,10 +11,14 @@
<e p="ISimRunner.cs" t="Include" />
<e p="IUserConsole.cs" t="Include" />
<e p="Maps" t="Include">
<e p="Direction.cs" t="Include" />
<e p="Heading.cs" t="Include" />
<e p="HexCell.cs" t="Include" />
<e p="HexMap.cs" t="Include" />
<e p="ICell.cs" t="Include" />
<e p="IHexCell.cs" t="Include" />
<e p="IHexMap.cs" t="Include" />
<e p="IMap.cs" t="Include" />
<e p="IMapFactory.cs" t="Include" />
<e p="ISquareCell.cs" t="Include" />
<e p="ISquareMap.cs" t="Include" />

View File

@@ -15,14 +15,19 @@
</component>
<component name="ChangeListManager">
<list default="true" id="dafcaeb7-80aa-43a3-a480-786fafb78c0b" name="Default Changelist" comment="">
<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/CoreModule.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/CoreModule.cs" 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/Module.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/Program.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/Program.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ConsoleApp/UserConsole.cs" beforeDir="false" afterPath="$PROJECT_DIR$/ConsoleApp/UserConsole.cs" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -51,21 +56,27 @@
<option value="$PROJECT_DIR$/ConsoleApp/MapFactory.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/IMapFactory.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Bootstrapper.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/IMapFactory.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/ISimRunner.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/SimRunner.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/MapFactory.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/SquareMap.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/HexMap.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/IHexMap.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/ISquareMap.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/IHexCell.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/ISquareCell.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/SquareCell.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/HexCell.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" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/IHexCell.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/MapManager.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/ISquareMap.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/IHexMap.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/IMap.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/IMapFactory.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/ICell.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/SquareMap.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/SquareCell.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/HexCell.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/ISquareCell.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/MapFactory.cs" />
<option value="$PROJECT_DIR$/ConsoleApp/Maps/HexMap.cs" />
</list>
</option>
</component>
@@ -82,6 +93,7 @@
<property name="DebuggerViewTab_PTCS_LastProportionKey" value="0.29991126" />
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="settings.editor.selected.configurable" value="SolutionBuilderGeneralOptionsPageId" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
@@ -134,7 +146,7 @@
<workItem from="1607286402206" duration="6845000" />
<workItem from="1607640133651" duration="318000" />
<workItem from="1607640470920" duration="58000" />
<workItem from="1607640550443" duration="960000" />
<workItem from="1607640550443" duration="9566000" />
</task>
<servers />
</component>
@@ -159,101 +171,101 @@
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
</component>
<component name="WindowStateProjectService">
<state width="1158" height="581" key="GridCell.Tab.0.bottom" timestamp="1607641379864">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="563" key="GridCell.Tab.0.bottom" timestamp="1607657316327">
<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="1607641114775" />
<state width="1158" height="717" key="GridCell.Tab.0.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483925" />
<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="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="581" key="GridCell.Tab.0.center" timestamp="1607641379862">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="563" key="GridCell.Tab.0.center" timestamp="1607657316326">
<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="1607641114773" />
<state width="1158" height="717" key="GridCell.Tab.0.center/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483923" />
<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="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="581" key="GridCell.Tab.0.left" timestamp="1607641379861">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="563" key="GridCell.Tab.0.left" timestamp="1607657316325">
<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="1607641114772" />
<state width="1158" height="717" key="GridCell.Tab.0.left/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483923" />
<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="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="581" key="GridCell.Tab.0.right" timestamp="1607641379863">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="563" key="GridCell.Tab.0.right" timestamp="1607657316326">
<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="1607641114774" />
<state width="1158" height="717" key="GridCell.Tab.0.right/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483924" />
<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="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="738" key="GridCell.Tab.1.bottom" timestamp="1607640745266">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="716" key="GridCell.Tab.1.bottom" timestamp="1607657084436">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="738" key="GridCell.Tab.1.bottom/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640745266" />
<state width="1158" height="717" key="GridCell.Tab.1.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483781" />
<state width="1158" height="716" key="GridCell.Tab.1.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657084436" />
<state width="1158" height="738" key="GridCell.Tab.1.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640704043" />
<state width="1158" height="738" key="GridCell.Tab.1.center" timestamp="1607640745263">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="716" key="GridCell.Tab.1.center" timestamp="1607657084434">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="738" key="GridCell.Tab.1.center/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640745263" />
<state width="1158" height="717" key="GridCell.Tab.1.center/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483781" />
<state width="1158" height="716" key="GridCell.Tab.1.center/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657084434" />
<state width="1158" height="738" key="GridCell.Tab.1.center/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640704040" />
<state width="1158" height="738" key="GridCell.Tab.1.left" timestamp="1607640745262">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="716" key="GridCell.Tab.1.left" timestamp="1607657084433">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="738" key="GridCell.Tab.1.left/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640745262" />
<state width="1158" height="717" key="GridCell.Tab.1.left/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483780" />
<state width="1158" height="716" key="GridCell.Tab.1.left/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657084433" />
<state width="1158" height="738" key="GridCell.Tab.1.left/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640704038" />
<state width="1158" height="738" key="GridCell.Tab.1.right" timestamp="1607640745264">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="716" key="GridCell.Tab.1.right" timestamp="1607657084435">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="738" key="GridCell.Tab.1.right/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640745264" />
<state width="1158" height="717" key="GridCell.Tab.1.right/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483781" />
<state width="1158" height="716" key="GridCell.Tab.1.right/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657084435" />
<state width="1158" height="738" key="GridCell.Tab.1.right/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640704041" />
<state width="1158" height="738" key="GridCell.Tab.2.bottom" timestamp="1607640745280">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="716" key="GridCell.Tab.2.bottom" timestamp="1607657084438">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="738" key="GridCell.Tab.2.bottom/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640745280" />
<state width="1158" height="717" key="GridCell.Tab.2.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483782" />
<state width="1158" height="716" key="GridCell.Tab.2.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657084438" />
<state width="1158" height="738" key="GridCell.Tab.2.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640704050" />
<state width="1158" height="738" key="GridCell.Tab.2.center" timestamp="1607640745275">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="716" key="GridCell.Tab.2.center" timestamp="1607657084437">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="738" key="GridCell.Tab.2.center/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640745275" />
<state width="1158" height="717" key="GridCell.Tab.2.center/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483782" />
<state width="1158" height="716" key="GridCell.Tab.2.center/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657084437" />
<state width="1158" height="738" key="GridCell.Tab.2.center/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640704048" />
<state width="1158" height="738" key="GridCell.Tab.2.left" timestamp="1607640745274">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="716" key="GridCell.Tab.2.left" timestamp="1607657084437">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="738" key="GridCell.Tab.2.left/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640745274" />
<state width="1158" height="717" key="GridCell.Tab.2.left/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483781" />
<state width="1158" height="716" key="GridCell.Tab.2.left/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657084437" />
<state width="1158" height="738" key="GridCell.Tab.2.left/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640704046" />
<state width="1158" height="738" key="GridCell.Tab.2.right" timestamp="1607640745277">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="716" key="GridCell.Tab.2.right" timestamp="1607657084438">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="738" key="GridCell.Tab.2.right/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640745277" />
<state width="1158" height="717" key="GridCell.Tab.2.right/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483782" />
<state width="1158" height="716" key="GridCell.Tab.2.right/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657084438" />
<state width="1158" height="738" key="GridCell.Tab.2.right/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640704049" />
<state width="1158" height="738" key="GridCell.Tab.3.bottom" timestamp="1607640745288">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="716" key="GridCell.Tab.3.bottom" timestamp="1607657084440">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="738" key="GridCell.Tab.3.bottom/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640745288" />
<state width="1158" height="717" key="GridCell.Tab.3.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483784" />
<state width="1158" height="716" key="GridCell.Tab.3.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657084440" />
<state width="1158" height="738" key="GridCell.Tab.3.bottom/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640704055" />
<state width="1158" height="738" key="GridCell.Tab.3.center" timestamp="1607640745286">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="716" key="GridCell.Tab.3.center" timestamp="1607657084439">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="738" key="GridCell.Tab.3.center/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640745286" />
<state width="1158" height="717" key="GridCell.Tab.3.center/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483783" />
<state width="1158" height="716" key="GridCell.Tab.3.center/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657084439" />
<state width="1158" height="738" key="GridCell.Tab.3.center/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640704053" />
<state width="1158" height="738" key="GridCell.Tab.3.left" timestamp="1607640745282">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="716" key="GridCell.Tab.3.left" timestamp="1607657084439">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="738" key="GridCell.Tab.3.left/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640745282" />
<state width="1158" height="717" key="GridCell.Tab.3.left/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483783" />
<state width="1158" height="716" key="GridCell.Tab.3.left/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657084439" />
<state width="1158" height="738" key="GridCell.Tab.3.left/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640704052" />
<state width="1158" height="738" key="GridCell.Tab.3.right" timestamp="1607640745287">
<screen x="1440" y="-782" width="1200" height="1920" />
<state width="1158" height="716" key="GridCell.Tab.3.right" timestamp="1607657084440">
<screen x="1440" y="-757" width="1200" height="1895" />
</state>
<state width="1158" height="738" key="GridCell.Tab.3.right/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640745287" />
<state width="1158" height="717" key="GridCell.Tab.3.right/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607639483784" />
<state width="1158" height="716" key="GridCell.Tab.3.right/0.25.1440.798/2640.-757.1200.1895/1440.-757.1200.1895@1440.-757.1200.1895" timestamp="1607657084440" />
<state width="1158" height="738" key="GridCell.Tab.3.right/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607640704054" />
<state x="1640" y="-86" key="Rider.ProjectTemplateDialog.Size" timestamp="1607640243485">
<screen x="1440" y="-782" width="1200" height="1920" />

View File

@@ -5,15 +5,15 @@ namespace ConsoleApp.Maps
{
public struct HexCell : IHexCell
{
public int Q { get; }
public int R { get; }
public int S { get; }
public int X { get; }
public int Y { get; }
public int Z { get; }
public HexCell(int q, int r, int s)
{
if (q + r + s != 0) throw new ArgumentException("q + r + s must be 0");
Q = q;
R = r;
S = s;
X = q;
Y = r;
Z = s;
}
}

View File

@@ -3,21 +3,23 @@ using System.Collections.Generic;
namespace ConsoleApp.Maps
{
public class HexMap
public class HexMap : IHexMap
{
private HexCell[,] Map { get; }
public HexMap(int x, int y)
{
Map = new HexCell[x+1,y+1];
for (int r = 0; r < y; r++) {
int r_offset = Convert.ToInt32(Math.Floor(Convert.ToDouble(r)/2));
for (int q = -r_offset; q < x - r_offset; q++) {
for (int q = r_offset; q < x - r_offset; q++) {
// Console.WriteLine($"r:{r}, q:{q}-----x:{x}, y:{y}");
Map[r, q] = new HexCell(q, r, -q-r);
}
}
}
public List<ICell> PossibleMoves(HexCell fromCell, Direction direction, Double orientation)
public List<ICell> PossibleMoves(ICell currentCell)
{
throw new NotImplementedException();
}

View File

@@ -2,6 +2,8 @@ namespace ConsoleApp.Maps
{
public interface ICell
{
int X { get; }
int Y { get; }
int Z { get; }
}
}

View File

@@ -1,6 +1,6 @@
namespace ConsoleApp.Maps
{
public interface IHexMap
public interface IHexMap : IMap
{
}

View File

@@ -4,6 +4,6 @@ namespace ConsoleApp.Maps
{
public interface IMap
{
public List<ICell> PossibleMoves();
public List<ICell> PossibleMoves(ICell currentCell);
}
}

View File

@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.Dynamic;
namespace ConsoleApp.Maps
@@ -6,7 +7,7 @@ namespace ConsoleApp.Maps
{
int Height { get; }
int Width { get; }
SquareMap SquareMap { get; }
Dictionary<string, IMap> Maps { get; }
void GenerateMaps(int x, int y);
}
}

View File

@@ -2,7 +2,7 @@ namespace ConsoleApp.Maps
{
public interface ISquareCell : ICell
{
int X { get; }
int Y { get; }
new int X { get; }
new int Y { get; }
}
}

View File

@@ -1,6 +1,6 @@
namespace ConsoleApp.Maps
{
public interface ISquareMap
public interface ISquareMap : IMap
{
}

View File

@@ -1,3 +1,5 @@
using System.Collections.Generic;
namespace ConsoleApp.Maps
{
public class MapFactory : IMapFactory
@@ -6,15 +8,16 @@ namespace ConsoleApp.Maps
private int _defaultWidth;
public int Height { get; protected set; }
public int Width { get; protected set; }
public SquareMap SquareMap { get; }
public HexMap HexMap { get; }
public Dictionary<string, IMap> Maps { get; }
public void GenerateMaps(int x, int y)
{
Width = x;
Height = y;
new SquareMap(x, y);
Maps.Add("SquareMap",new SquareMap(x, y));
Maps.Add("HexMap", new HexMap(x, y));
}
public MapFactory()
@@ -23,6 +26,7 @@ namespace ConsoleApp.Maps
_defaultWidth = 0;
Height = _defaultHeight;
Width = _defaultWidth;
Maps = new Dictionary<string, IMap>();
}
}

View File

@@ -4,11 +4,13 @@ namespace ConsoleApp.Maps
{
public int X { get; }
public int Y { get; }
public int Z { get; }
public SquareCell(int x, int y)
{
X = x;
Y = y;
Z = default;
}
}
}

View File

@@ -19,12 +19,12 @@ namespace ConsoleApp.Maps
}
}
public List<ICell> PossibleMoves(SquareCell myCell)
public List<ICell> PossibleMoves(ICell currentCell)
{
var forward = (myCell.X , myCell.Y + 1);
var backwards= (myCell.X , myCell.Y - 1);
var right = (myCell.X + 1, myCell.Y);
var left = (myCell.X - 1, myCell.Y);
var forward = (currentCell.X , currentCell.Y + 1);
var backwards= (currentCell.X , currentCell.Y - 1);
var right = (currentCell.X + 1, currentCell.Y);
var left = (currentCell.X - 1, currentCell.Y);
var possibles = new List<ICell>();
possibles.Add(Map[forward.Item1, forward.Item2]);
possibles.Add(Map[backwards.Item1, backwards.Item2]);

View File

@@ -13,7 +13,7 @@ namespace ConsoleApp
public void Run()
{
throw new System.NotImplementedException();
}
}
}