Added maps
This commit is contained in:
@@ -7,10 +7,13 @@
|
|||||||
<e p="Bootstrapper.cs" t="Include" />
|
<e p="Bootstrapper.cs" t="Include" />
|
||||||
<e p="ConsoleApp.csproj" t="IncludeRecursive" />
|
<e p="ConsoleApp.csproj" t="IncludeRecursive" />
|
||||||
<e p="CoreModule.cs" t="Include" />
|
<e p="CoreModule.cs" t="Include" />
|
||||||
<e p="IMapFactory.cs" t="Include" />
|
|
||||||
<e p="IModule.cs" t="Include" />
|
<e p="IModule.cs" t="Include" />
|
||||||
|
<e p="ISimRunner.cs" t="Include" />
|
||||||
<e p="IUserConsole.cs" t="Include" />
|
<e p="IUserConsole.cs" t="Include" />
|
||||||
<e p="MapFactory.cs" t="Include" />
|
<e p="Maps" t="Include">
|
||||||
|
<e p="IMapFactory.cs" t="Include" />
|
||||||
|
<e p="MapFactory.cs" t="Include" />
|
||||||
|
</e>
|
||||||
<e p="Module.cs" t="Include" />
|
<e p="Module.cs" t="Include" />
|
||||||
<e p="obj" t="ExcludeRecursive">
|
<e p="obj" t="ExcludeRecursive">
|
||||||
<e p="Debug" t="Include">
|
<e p="Debug" t="Include">
|
||||||
@@ -20,6 +23,7 @@
|
|||||||
</e>
|
</e>
|
||||||
</e>
|
</e>
|
||||||
<e p="Program.cs" t="Include" />
|
<e p="Program.cs" t="Include" />
|
||||||
|
<e p="SimRunner.cs" t="Include" />
|
||||||
<e p="UserConsole.cs" t="Include" />
|
<e p="UserConsole.cs" t="Include" />
|
||||||
</e>
|
</e>
|
||||||
<e p="packages" t="ExcludeRecursive" />
|
<e p="packages" t="ExcludeRecursive" />
|
||||||
|
|||||||
30
.idea/.idea.RobotIntelFinal/.idea/workspace.xml
generated
30
.idea/.idea.RobotIntelFinal/.idea/workspace.xml
generated
@@ -16,10 +16,12 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="dafcaeb7-80aa-43a3-a480-786fafb78c0b" name="Default Changelist" comment="">
|
<list default="true" id="dafcaeb7-80aa-43a3-a480-786fafb78c0b" name="Default Changelist" comment="">
|
||||||
<change afterPath="$PROJECT_DIR$/ConsoleApp/Bootstrapper.cs" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/ConsoleApp/Bootstrapper.cs" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/ConsoleApp/IMapFactory.cs" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/ConsoleApp/ISimRunner.cs" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/ConsoleApp/IUserConsole.cs" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/ConsoleApp/IUserConsole.cs" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/ConsoleApp/MapFactory.cs" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/ConsoleApp/Maps/IMapFactory.cs" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/ConsoleApp/Maps/MapFactory.cs" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/ConsoleApp/Module.cs" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/ConsoleApp/Module.cs" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/ConsoleApp/SimRunner.cs" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/ConsoleApp/UserConsole.cs" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/ConsoleApp/UserConsole.cs" 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/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$/.idea/.idea.RobotIntelFinal/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.RobotIntelFinal/.idea/workspace.xml" afterDir="false" />
|
||||||
@@ -58,11 +60,13 @@
|
|||||||
<option value="$PROJECT_DIR$/ConsoleApp/IUserConsole.cs" />
|
<option value="$PROJECT_DIR$/ConsoleApp/IUserConsole.cs" />
|
||||||
<option value="$PROJECT_DIR$/ConsoleApp/Module.cs" />
|
<option value="$PROJECT_DIR$/ConsoleApp/Module.cs" />
|
||||||
<option value="$PROJECT_DIR$/ConsoleApp/CoreModule.cs" />
|
<option value="$PROJECT_DIR$/ConsoleApp/CoreModule.cs" />
|
||||||
<option value="$PROJECT_DIR$/ConsoleApp/IMapFactory.cs" />
|
|
||||||
<option value="$PROJECT_DIR$/ConsoleApp/MapFactory.cs" />
|
<option value="$PROJECT_DIR$/ConsoleApp/MapFactory.cs" />
|
||||||
<option value="$PROJECT_DIR$/ConsoleApp/UserConsole.cs" />
|
<option value="$PROJECT_DIR$/ConsoleApp/UserConsole.cs" />
|
||||||
<option value="$PROJECT_DIR$/ConsoleApp/Program.cs" />
|
<option value="$PROJECT_DIR$/ConsoleApp/Program.cs" />
|
||||||
<option value="$PROJECT_DIR$/ConsoleApp/Bootstrapper.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/IMapFactory.cs" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
@@ -150,15 +154,31 @@
|
|||||||
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="WindowStateProjectService">
|
<component name="WindowStateProjectService">
|
||||||
|
<state width="1158" height="582" key="GridCell.Tab.0.bottom" timestamp="1607636097456">
|
||||||
|
<screen x="1440" y="-782" width="1200" height="1920" />
|
||||||
|
</state>
|
||||||
|
<state width="1158" height="582" key="GridCell.Tab.0.bottom/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607636097456" />
|
||||||
|
<state width="1158" height="582" key="GridCell.Tab.0.center" timestamp="1607636097453">
|
||||||
|
<screen x="1440" y="-782" width="1200" height="1920" />
|
||||||
|
</state>
|
||||||
|
<state width="1158" height="582" key="GridCell.Tab.0.center/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607636097453" />
|
||||||
|
<state width="1158" height="582" key="GridCell.Tab.0.left" timestamp="1607636097452">
|
||||||
|
<screen x="1440" y="-782" width="1200" height="1920" />
|
||||||
|
</state>
|
||||||
|
<state width="1158" height="582" key="GridCell.Tab.0.left/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607636097452" />
|
||||||
|
<state width="1158" height="582" key="GridCell.Tab.0.right" timestamp="1607636097454">
|
||||||
|
<screen x="1440" y="-782" width="1200" height="1920" />
|
||||||
|
</state>
|
||||||
|
<state width="1158" height="582" key="GridCell.Tab.0.right/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607636097454" />
|
||||||
<state x="1640" y="-86" key="Rider.ProjectTemplateDialog.Size" timestamp="1607287214952">
|
<state x="1640" y="-86" key="Rider.ProjectTemplateDialog.Size" timestamp="1607287214952">
|
||||||
<screen x="1440" y="-782" width="1200" height="1920" />
|
<screen x="1440" y="-782" width="1200" height="1920" />
|
||||||
</state>
|
</state>
|
||||||
<state x="1640" y="-86" key="Rider.ProjectTemplateDialog.Size/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607286605974" />
|
<state x="1640" y="-86" key="Rider.ProjectTemplateDialog.Size/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607286605974" />
|
||||||
<state x="1640" y="-86" key="Rider.ProjectTemplateDialog.Size/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607287214952" />
|
<state x="1640" y="-86" key="Rider.ProjectTemplateDialog.Size/0.25.1440.798/2640.-757.1200.1895/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607287214952" />
|
||||||
<state x="1860" y="-144" key="RiderGenerateDialog" timestamp="1607634276930">
|
<state x="1860" y="-144" key="RiderGenerateDialog" timestamp="1607635610011">
|
||||||
<screen x="1440" y="-782" width="1200" height="1920" />
|
<screen x="1440" y="-782" width="1200" height="1920" />
|
||||||
</state>
|
</state>
|
||||||
<state x="1860" y="-144" key="RiderGenerateDialog/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607634276930" />
|
<state x="1860" y="-144" key="RiderGenerateDialog/0.0.1440.900/2640.-782.1200.1920/1440.-782.1200.1920@1440.-782.1200.1920" timestamp="1607635610011" />
|
||||||
<state x="1703" y="-333" width="672" height="678" key="search.everywhere.popup" timestamp="1607633696072">
|
<state x="1703" y="-333" width="672" height="678" key="search.everywhere.popup" timestamp="1607633696072">
|
||||||
<screen x="1440" y="-782" width="1200" height="1920" />
|
<screen x="1440" y="-782" width="1200" height="1920" />
|
||||||
</state>
|
</state>
|
||||||
|
|||||||
@@ -1,7 +1,34 @@
|
|||||||
|
using DryIoc;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace ConsoleApp
|
namespace ConsoleApp
|
||||||
{
|
{
|
||||||
public class Bootstrapper
|
public class BootStrapper
|
||||||
{
|
{
|
||||||
p
|
private static readonly string NoBootstrapperMessage = $"Called {nameof(BootStrapper)} before it existed";
|
||||||
|
|
||||||
|
private static BootStrapper _bootStrapper;
|
||||||
|
private static IContainer _container;
|
||||||
|
|
||||||
|
public static BootStrapper Instance =>
|
||||||
|
_bootStrapper ?? throw new InvalidOperationException(NoBootstrapperMessage);
|
||||||
|
|
||||||
|
public BootStrapper(params IModule[] modules)
|
||||||
|
{
|
||||||
|
_container = new Container();
|
||||||
|
foreach (var module in modules)
|
||||||
|
{
|
||||||
|
module.Register(_container);
|
||||||
|
}
|
||||||
|
foreach (var module in modules)
|
||||||
|
{
|
||||||
|
module.Resolve(_container);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BootStrapper BootstrapSystem(params IModule[] modules) =>
|
||||||
|
_bootStrapper = new BootStrapper(modules);
|
||||||
|
|
||||||
|
public T Resolve<T>() => _container.Resolve<T>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,6 @@ namespace ConsoleApp
|
|||||||
{
|
{
|
||||||
public interface ISimRunner
|
public interface ISimRunner
|
||||||
{
|
{
|
||||||
void GenerateMaps(int x, int y);
|
void Run();
|
||||||
void StartSim();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
7
ConsoleApp/Maps/HexCell.cs
Normal file
7
ConsoleApp/Maps/HexCell.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace ConsoleApp
|
||||||
|
{
|
||||||
|
public class HexCell
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
7
ConsoleApp/Maps/HexMap.cs
Normal file
7
ConsoleApp/Maps/HexMap.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace ConsoleApp
|
||||||
|
{
|
||||||
|
public class HexMap
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
7
ConsoleApp/Maps/IHexCell.cs
Normal file
7
ConsoleApp/Maps/IHexCell.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace ConsoleApp
|
||||||
|
{
|
||||||
|
public interface IHexCell
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
7
ConsoleApp/Maps/IHexMap.cs
Normal file
7
ConsoleApp/Maps/IHexMap.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace ConsoleApp
|
||||||
|
{
|
||||||
|
public interface IHexMap
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,5 +7,6 @@ namespace ConsoleApp
|
|||||||
int Height { get; }
|
int Height { get; }
|
||||||
int Width { get; }
|
int Width { get; }
|
||||||
SquareMap SquareMap { get; }
|
SquareMap SquareMap { get; }
|
||||||
|
void GenerateMaps(int x, int y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
7
ConsoleApp/Maps/ISquareCell.cs
Normal file
7
ConsoleApp/Maps/ISquareCell.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace ConsoleApp
|
||||||
|
{
|
||||||
|
public interface ISquareCell
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
7
ConsoleApp/Maps/ISquareMap.cs
Normal file
7
ConsoleApp/Maps/ISquareMap.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace ConsoleApp
|
||||||
|
{
|
||||||
|
public interface ISquareMap
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,16 @@ namespace ConsoleApp
|
|||||||
private int _defaultWidth;
|
private int _defaultWidth;
|
||||||
public int Height { get; protected set; }
|
public int Height { get; protected set; }
|
||||||
public int Width { get; protected set; }
|
public int Width { get; protected set; }
|
||||||
|
public SquareMap SquareMap { get; }
|
||||||
|
public HexMap HexMap { get; }
|
||||||
|
|
||||||
|
|
||||||
|
public void GenerateMaps(int x, int y)
|
||||||
|
{
|
||||||
|
Width = x;
|
||||||
|
Height = y;
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
public MapFactory()
|
public MapFactory()
|
||||||
{
|
{
|
||||||
@@ -14,16 +24,6 @@ namespace ConsoleApp
|
|||||||
Height = _defaultHeight;
|
Height = _defaultHeight;
|
||||||
Width = _defaultWidth;
|
Width = _defaultWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateMaps(int height, int width)
|
|
||||||
{
|
|
||||||
Height = height;
|
|
||||||
Width = width;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CreateMaps()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
7
ConsoleApp/Maps/SquareCell.cs
Normal file
7
ConsoleApp/Maps/SquareCell.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace ConsoleApp
|
||||||
|
{
|
||||||
|
public class SquareCell
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
7
ConsoleApp/Maps/SquareMap.cs
Normal file
7
ConsoleApp/Maps/SquareMap.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace ConsoleApp
|
||||||
|
{
|
||||||
|
public class SquareMap
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,9 +5,11 @@ namespace ConsoleApp
|
|||||||
class Program
|
class Program
|
||||||
{
|
{
|
||||||
private static UserConsole _userConsole;
|
private static UserConsole _userConsole;
|
||||||
|
private static BootStrapper _bootstrapper;
|
||||||
|
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
_bootstrapper = new BootStrapper();
|
||||||
_userConsole = new UserConsole();
|
_userConsole = new UserConsole();
|
||||||
StartSimulation();
|
StartSimulation();
|
||||||
}
|
}
|
||||||
@@ -30,8 +32,11 @@ namespace ConsoleApp
|
|||||||
|
|
||||||
private static void RunSimulation(int x,int y)
|
private static void RunSimulation(int x,int y)
|
||||||
{
|
{
|
||||||
var bootStrapper = new Bootstrapper
|
var simRunner = _bootstrapper.Resolve<ISimRunner>();
|
||||||
var simRunner = new SimRunner();
|
var mapFactory = _bootstrapper.Resolve<IMapFactory>();
|
||||||
|
|
||||||
|
mapFactory.GenerateMaps(x, y);
|
||||||
|
simRunner.Run();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,14 +8,8 @@ namespace ConsoleApp
|
|||||||
{
|
{
|
||||||
_mapFactory = mapFactory;
|
_mapFactory = mapFactory;
|
||||||
}
|
}
|
||||||
public void GenerateMaps(int x, int y)
|
|
||||||
{
|
|
||||||
_mapFactory.GenerateMaps(x, y);
|
|
||||||
_mapFactory.SquareMap();
|
|
||||||
throw new System.NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StartSim()
|
public void Run()
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user