diff --git a/Trunk/Components/CzokoŚmieciarka.AI_Naive/CzokoŚmieciarka.AI_Naive.csproj b/Trunk/Components/CzokoŚmieciarka.AI_Naive/CzokoŚmieciarka.AI_Naive.csproj
index b58cd80..a297f33 100644
--- a/Trunk/Components/CzokoŚmieciarka.AI_Naive/CzokoŚmieciarka.AI_Naive.csproj
+++ b/Trunk/Components/CzokoŚmieciarka.AI_Naive/CzokoŚmieciarka.AI_Naive.csproj
@@ -41,7 +41,6 @@
-
diff --git a/Trunk/Components/CzokoŚmieciarka.AI_Naive/RoutePlanningEngine.cs b/Trunk/Components/CzokoŚmieciarka.AI_Naive/RoutePlanningEngine.cs
deleted file mode 100644
index 0442add..0000000
--- a/Trunk/Components/CzokoŚmieciarka.AI_Naive/RoutePlanningEngine.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using CzokoŚmieciarka.DataModels.Enums;
-using CzokoŚmieciarka.DataModels.Interfaces;
-
-using CzokoŚmieciarka.DataModels.Interfaces.Road;
-using CzokoŚmieciarka.DataModels.Interfaces.RoutePlanningEngine;
-using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
-using CzokoŚmieciarka.DataModels.Models;
-using CzokoŚmieciarka.DataModels.Models.Steps;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace Czoko_Smieciarka.AI_Naive
-{
- public class RoutePlanningEngine : IRoutePlanningEngine
- {
- IGarbageCollector Collector { get; set; }
-
- IGarbageCollector CollectorClone { get; set; }
-
- object[,] Board { get; set; }
-
- object[,] BoardClone { get; set; }
-
-
-
- public IEnumerable ReturnSteps()
- {
- throw new NotImplementedException();
- }
-
- public RoutePlanningEngine(object[,] board, IGarbageCollector collector)
- {
- this.Collector = collector;
- this.CollectorClone = (IGarbageCollector) collector.Clone();
- this.Board = board;
- this.BoardClone = (object [,]) board.Clone();
-
- }
-
- IEnumerable PossibleSteps(object[,] BoardClone, IGarbageCollector CollectorClone)
- {
- var x = CollectorClone.Coords.X;
- var y = CollectorClone.Coords.Y;
- var maxX = BoardClone.GetLength(0) - 1;
- var maxY = BoardClone.GetLength(1) - 1;
-
-
- var currentCollector = CollectorClone.Clone();
- var Moves = new List
- {
- new MoveStep(Direction.Left, CollectorClone),
- new MoveStep(Direction.Right, CollectorClone),
- new MoveStep(Direction.Up, CollectorClone),
- new MoveStep(Direction.Down, CollectorClone)
- }
-
-
- }
-
-
- }
-}
\ No newline at end of file
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/CzokoŚmieciarka.DataModels.csproj b/Trunk/Components/CzokoŚmieciarka.DataModels/CzokoŚmieciarka.DataModels.csproj
index c8a4a65..de4f401 100644
--- a/Trunk/Components/CzokoŚmieciarka.DataModels/CzokoŚmieciarka.DataModels.csproj
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/CzokoŚmieciarka.DataModels.csproj
@@ -1,4 +1,3 @@
-<<<<<<< HEAD
@@ -46,12 +45,12 @@
+
-
-
+
@@ -67,73 +66,4 @@
-=======
-
-
-
-
- Debug
- AnyCPU
- {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}
- Library
- Properties
- CzokoŚmieciarka.DataModels
- CzokoŚmieciarka.DataModels
- v4.6.1
- 512
- true
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
->>>>>>> 9aaa79a5c5258bc287f1041f4b31f5a40e5cf25f
\ No newline at end of file
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/GarbageCollector/AGarbageCollector.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/GarbageCollector/AGarbageCollector.cs
index b606334..bb77904 100644
--- a/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/GarbageCollector/AGarbageCollector.cs
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/GarbageCollector/AGarbageCollector.cs
@@ -1,9 +1,9 @@
-<<<<<<< HEAD
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using CzokoŚmieciarka.DataModels.Exceptions;
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
using CzokoŚmieciarka.DataModels.Models;
@@ -11,90 +11,50 @@ namespace CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector
{
public abstract class AGarbageCollector : IGarbageCollector
{
- public AGarbageCollector(Coords startPosition, IEnumerable trashContainers)
+ public AGarbageCollector(Coords startPosition, IEnumerable trashContainers, int columns, int rows)
{
+ this.columns = columns;
+ this.rows = rows;
this.Coords = startPosition;
this.TrashContainers = trashContainers;
}
public Coords Coords { get; set; }
-
- public Coords MoveUp()
- {
- return new Coords(Coords.X,Coords.Y+1);
- }
-
- public Coords MoveDown()
- {
- return new Coords(Coords.X, Coords.Y - 1);
- }
-
- public Coords MoveLeft()
- {
- return new Coords(Coords.X-1, Coords.Y);
- }
-
- public Coords MoveRight()
- {
- return new Coords(Coords.X+1, Coords.Y);
-=======
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using CzokoŚmieciarka.DataModels.Exceptions;
-using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
-using CzokoŚmieciarka.DataModels.Models;
-
-namespace CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector
-{
- public abstract class AGarbageCollector : IGarbageCollector
- {
- public AGarbageCollector(Coords startPosition, IEnumerable trashContainers, int columns, int rows)
- {
- this.columns = columns;
- this.rows = rows;
- this.Coords = startPosition;
- this.TrashContainers = trashContainers;
- }
- public Coords Coords { get; set; }
public int columns { get; set; }
- public int rows { get; set; }
- public void MoveUp()
- {
+ public int rows { get; set; }
+ public void MoveUp()
+ {
if(Coords.Y -1 < 0)
{
throw new OutOfGridException();
- }
- Coords.Y -= 1;
- }
-
- public void MoveDown()
- {
+ }
+ Coords.Y -= 1;
+ }
+
+ public void MoveDown()
+ {
if (Coords.Y + 1 >= rows)
{
throw new OutOfGridException();
- }
- Coords.Y +=1;
- }
-
- public void MoveLeft()
- {
+ }
+ Coords.Y +=1;
+ }
+
+ public void MoveLeft()
+ {
if (Coords.X - 1 < 0)
{
throw new OutOfGridException();
- }
- Coords.X -= 1;
- }
-
- public void MoveRight()
- {
+ }
+ Coords.X -= 1;
+ }
+
+ public void MoveRight()
+ {
if (Coords.X + 1 >= columns)
{
throw new OutOfGridException();
- }
+ }
Coords.X += 1;
->>>>>>> 9aaa79a5c5258bc287f1041f4b31f5a40e5cf25f
}
public object Clone()
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IRoad.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IRoad.cs
new file mode 100644
index 0000000..43c9b37
--- /dev/null
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IRoad.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CzokoŚmieciarka.DataModels.Interfaces
+{
+ public interface IRoad
+ {
+ }
+}
diff --git a/Trunk/CzokoŚmieciarka.sln b/Trunk/CzokoŚmieciarka.sln
index 44717df..7342d94 100644
--- a/Trunk/CzokoŚmieciarka.sln
+++ b/Trunk/CzokoŚmieciarka.sln
@@ -11,28 +11,95 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CzokoŚmieciarka.WPFv2", "I
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CzokoŚmieciarka.AI_Naive", "Components\CzokoŚmieciarka.AI_Naive\CzokoŚmieciarka.AI_Naive.csproj", "{10E77BBE-55E1-483D-A456-0E94EAC9B24A}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGameView", "MonoGameView\MonoGameView.csproj", "{EBE9431C-9B66-4300-B288-7A0F7B899415}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|ARM = Debug|ARM
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|ARM = Release|ARM
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|ARM.Build.0 = Debug|Any CPU
+ {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|x64.Build.0 = Debug|Any CPU
+ {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|x86.Build.0 = Debug|Any CPU
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|ARM.ActiveCfg = Release|Any CPU
+ {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|ARM.Build.0 = Release|Any CPU
+ {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|x64.ActiveCfg = Release|Any CPU
+ {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|x64.Build.0 = Release|Any CPU
+ {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|x86.ActiveCfg = Release|Any CPU
+ {F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|x86.Build.0 = Release|Any CPU
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|ARM.Build.0 = Debug|Any CPU
+ {A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|x64.Build.0 = Debug|Any CPU
+ {A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|x86.Build.0 = Debug|Any CPU
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|ARM.ActiveCfg = Release|Any CPU
+ {A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|ARM.Build.0 = Release|Any CPU
+ {A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|x64.ActiveCfg = Release|Any CPU
+ {A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|x64.Build.0 = Release|Any CPU
+ {A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|x86.ActiveCfg = Release|Any CPU
+ {A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|x86.Build.0 = Release|Any CPU
{2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Debug|ARM.Build.0 = Debug|Any CPU
+ {2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Debug|x64.Build.0 = Debug|Any CPU
+ {2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Debug|x86.Build.0 = Debug|Any CPU
{2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Release|ARM.ActiveCfg = Release|Any CPU
+ {2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Release|ARM.Build.0 = Release|Any CPU
+ {2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Release|x64.ActiveCfg = Release|Any CPU
+ {2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Release|x64.Build.0 = Release|Any CPU
+ {2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Release|x86.ActiveCfg = Release|Any CPU
+ {2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}.Release|x86.Build.0 = Release|Any CPU
{10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Debug|ARM.Build.0 = Debug|Any CPU
+ {10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Debug|x64.Build.0 = Debug|Any CPU
+ {10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Debug|x86.Build.0 = Debug|Any CPU
{10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Release|ARM.ActiveCfg = Release|Any CPU
+ {10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Release|ARM.Build.0 = Release|Any CPU
+ {10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Release|x64.ActiveCfg = Release|Any CPU
+ {10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Release|x64.Build.0 = Release|Any CPU
+ {10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Release|x86.ActiveCfg = Release|Any CPU
+ {10E77BBE-55E1-483D-A456-0E94EAC9B24A}.Release|x86.Build.0 = Release|Any CPU
+ {EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|Any CPU.Build.0 = Debug|x86
+ {EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|ARM.ActiveCfg = Debug|x86
+ {EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|x64.ActiveCfg = Debug|x86
+ {EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|x86.ActiveCfg = Debug|x86
+ {EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|x86.Build.0 = Debug|x86
+ {EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|Any CPU.ActiveCfg = Release|x86
+ {EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|ARM.ActiveCfg = Release|x86
+ {EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|x64.ActiveCfg = Release|x86
+ {EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|x86.ActiveCfg = Release|x86
+ {EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Trunk/Interface/CzokoŚmieciarka.WPFv2/CzokoŚmieciarka.WPFv2.csproj b/Trunk/Interface/CzokoŚmieciarka.WPFv2/CzokoŚmieciarka.WPFv2.csproj
index 2f28bef..69761c4 100644
--- a/Trunk/Interface/CzokoŚmieciarka.WPFv2/CzokoŚmieciarka.WPFv2.csproj
+++ b/Trunk/Interface/CzokoŚmieciarka.WPFv2/CzokoŚmieciarka.WPFv2.csproj
@@ -73,6 +73,7 @@
+
diff --git a/Trunk/Interface/CzokoŚmieciarka.WPFv2/MainWindow.xaml.cs b/Trunk/Interface/CzokoŚmieciarka.WPFv2/MainWindow.xaml.cs
index 4523793..61d7729 100644
--- a/Trunk/Interface/CzokoŚmieciarka.WPFv2/MainWindow.xaml.cs
+++ b/Trunk/Interface/CzokoŚmieciarka.WPFv2/MainWindow.xaml.cs
@@ -13,7 +13,6 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
-using Czoko_Smieciarka.AI_Naive;
using CzokoŚmieciarka.DataModels.Enums;
using CzokoŚmieciarka.DataModels.GeneralModels.Models;
using CzokoŚmieciarka.DataModels.Interfaces;
@@ -34,7 +33,6 @@ namespace CzokoŚmieciarka.WPFv2
IWPFObject[,] Objects = new IWPFObject[Columns,Rows];
private IEnumerable GarbageCollectorContainers;
private WPFGarbageCollector garbageCollector;
- private RoutePlanningEngine routePlanningEngine;
public MainWindow()
{
@@ -145,14 +143,7 @@ namespace CzokoŚmieciarka.WPFv2
Board.Children.Add(Objects[1, 3].Image);
- routePlanningEngine = new RoutePlanningEngine(garbageCollector,
- new List()
- {
- new GarbageLocalization(house.Coords,house.TrashCans)
- },
- new List()
- {
- });
+
}
}
}
diff --git a/Trunk/Interface/CzokoŚmieciarka.WPFv2/Models/ImageContainer.cs b/Trunk/Interface/CzokoŚmieciarka.WPFv2/Models/ImageContainer.cs
new file mode 100644
index 0000000..5804482
--- /dev/null
+++ b/Trunk/Interface/CzokoŚmieciarka.WPFv2/Models/ImageContainer.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Media.Imaging;
+
+namespace CzokoŚmieciarka.WPFv2.Models
+{
+ public sealed class ImageContainer
+ {
+ private static ImageContainer _Instance = null;
+
+ private Dictionary Images;
+
+
+ public static ImageContainer Instance {
+ get {
+ if (_Instance == null)
+ {
+ _Instance = new ImageContainer();
+ }
+ return _Instance;
+ }
+ }
+
+ public ImageContainer()
+ {
+ Images = new Dictionary();
+ Images.Add("Road", new Image { Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\intersection.png")) });
+ }
+
+
+ public Image GetImage(string s)
+ {
+ return Images[s];
+ }
+ }
+}
diff --git a/Trunk/Interface/CzokoŚmieciarka.WPFv2/Models/Road.cs b/Trunk/Interface/CzokoŚmieciarka.WPFv2/Models/Road.cs
index d50abb3..c682cd6 100644
--- a/Trunk/Interface/CzokoŚmieciarka.WPFv2/Models/Road.cs
+++ b/Trunk/Interface/CzokoŚmieciarka.WPFv2/Models/Road.cs
@@ -7,31 +7,24 @@ using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using CzokoŚmieciarka.DataModels.Models;
-using CzokoŚmieciarka.DataModels.Interfaces.Road;
+using CzokoŚmieciarka.DataModels.Interfaces;
using CzokoŚmieciarka.WPFv2.Interfaces;
namespace CzokoŚmieciarka.WPFv2.Models
{
class Road : IWPFObject, IRoad
{
- public Image Image { get; set; }
- //{
- // get
- // {
- // return new Image
- // {
- // Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\intersection.png"))
- // };
- // }
- //}
+ public Image Image
+ {
+ get
+ {
+ return ImageContainer.Instance.GetImage("Road");
+ }
+ }
public Road()
{
- Image = new Image()
- {
- Source =
- new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\intersection.png"))
- };
+
}
public Coords Coords { get; set; }
diff --git a/Trunk/Interface/CzokoŚmieciarka.WPFv2/Models/Road2.cs b/Trunk/Interface/CzokoŚmieciarka.WPFv2/Models/Road2.cs
index 8c818a4..6201a0a 100644
--- a/Trunk/Interface/CzokoŚmieciarka.WPFv2/Models/Road2.cs
+++ b/Trunk/Interface/CzokoŚmieciarka.WPFv2/Models/Road2.cs
@@ -7,11 +7,11 @@ using System.Windows.Controls;
using System.Windows.Media.Imaging;
using CzokoŚmieciarka.DataModels.Models;
using CzokoŚmieciarka.WPFv2.Interfaces;
-using CzokoŚmieciarka.DataModels.Interfaces.Road;
+using CzokoŚmieciarka.DataModels.Interfaces;
namespace CzokoŚmieciarka.WPFv2.Models
{
- class Road2 : IWPFObject, IRoad2
+ class Road2 : IWPFObject, IRoad
{
public string ImagePath { get; set; }
public Image Image { get; set; }
diff --git a/Trunk/MonoGameView/Content/Content.mgcb b/Trunk/MonoGameView/Content/Content.mgcb
new file mode 100644
index 0000000..6a07ece
--- /dev/null
+++ b/Trunk/MonoGameView/Content/Content.mgcb
@@ -0,0 +1,39 @@
+
+#----------------------------- Global Properties ----------------------------#
+
+/outputDir:bin/$(Platform)
+/intermediateDir:obj/$(Platform)
+/platform:Windows
+/config:
+/profile:Reach
+/compress:False
+
+#-------------------------------- References --------------------------------#
+
+
+#---------------------------------- Content ---------------------------------#
+
+#begin intersection.png
+/importer:TextureImporter
+/processor:TextureProcessor
+/processorParam:ColorKeyColor=255,0,255,255
+/processorParam:ColorKeyEnabled=True
+/processorParam:GenerateMipmaps=False
+/processorParam:PremultiplyAlpha=True
+/processorParam:ResizeToPowerOfTwo=False
+/processorParam:MakeSquare=False
+/processorParam:TextureFormat=Color
+/build:intersection.png
+
+#begin road.png
+/importer:TextureImporter
+/processor:TextureProcessor
+/processorParam:ColorKeyColor=255,0,255,255
+/processorParam:ColorKeyEnabled=True
+/processorParam:GenerateMipmaps=False
+/processorParam:PremultiplyAlpha=True
+/processorParam:ResizeToPowerOfTwo=False
+/processorParam:MakeSquare=False
+/processorParam:TextureFormat=Color
+/build:road.png
+
diff --git a/Trunk/MonoGameView/Content/Dumps/glass.png b/Trunk/MonoGameView/Content/Dumps/glass.png
new file mode 100644
index 0000000..60a475e
Binary files /dev/null and b/Trunk/MonoGameView/Content/Dumps/glass.png differ
diff --git a/Trunk/MonoGameView/Content/Dumps/organic.png b/Trunk/MonoGameView/Content/Dumps/organic.png
new file mode 100644
index 0000000..fec2e9e
Binary files /dev/null and b/Trunk/MonoGameView/Content/Dumps/organic.png differ
diff --git a/Trunk/MonoGameView/Content/Dumps/paper.png b/Trunk/MonoGameView/Content/Dumps/paper.png
new file mode 100644
index 0000000..548493e
Binary files /dev/null and b/Trunk/MonoGameView/Content/Dumps/paper.png differ
diff --git a/Trunk/MonoGameView/Content/Dumps/plasticmetal.png b/Trunk/MonoGameView/Content/Dumps/plasticmetal.png
new file mode 100644
index 0000000..cbf47a7
Binary files /dev/null and b/Trunk/MonoGameView/Content/Dumps/plasticmetal.png differ
diff --git a/Trunk/MonoGameView/Content/garbageCollector.png b/Trunk/MonoGameView/Content/garbageCollector.png
new file mode 100644
index 0000000..3283e83
Binary files /dev/null and b/Trunk/MonoGameView/Content/garbageCollector.png differ
diff --git a/Trunk/MonoGameView/Content/house.png b/Trunk/MonoGameView/Content/house.png
new file mode 100644
index 0000000..c69da1e
Binary files /dev/null and b/Trunk/MonoGameView/Content/house.png differ
diff --git a/Trunk/MonoGameView/Content/intersection.png b/Trunk/MonoGameView/Content/intersection.png
new file mode 100644
index 0000000..c57ed66
Binary files /dev/null and b/Trunk/MonoGameView/Content/intersection.png differ
diff --git a/Trunk/MonoGameView/Content/intersectionRED.png b/Trunk/MonoGameView/Content/intersectionRED.png
new file mode 100644
index 0000000..3914a2d
Binary files /dev/null and b/Trunk/MonoGameView/Content/intersectionRED.png differ
diff --git a/Trunk/MonoGameView/Content/road.png b/Trunk/MonoGameView/Content/road.png
new file mode 100644
index 0000000..2f84feb
Binary files /dev/null and b/Trunk/MonoGameView/Content/road.png differ
diff --git a/Trunk/MonoGameView/Game1.cs b/Trunk/MonoGameView/Game1.cs
new file mode 100644
index 0000000..db4b0dd
--- /dev/null
+++ b/Trunk/MonoGameView/Game1.cs
@@ -0,0 +1,92 @@
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using System;
+
+namespace MonoGameView
+{
+ ///
+ /// This is the main type for your game.
+ ///
+ public class Game1 : Game
+ {
+ GraphicsDeviceManager graphics;
+ SpriteBatch spriteBatch;
+ Texture2D road;
+ Vector2 roadPos;
+ public Game1()
+ {
+ graphics = new GraphicsDeviceManager(this);
+ Content.RootDirectory = "Content";
+ graphics.PreferredBackBufferWidth = 500;
+ graphics.PreferredBackBufferHeight = 500;
+ }
+
+ ///
+ /// Allows the game to perform any initialization it needs to before starting to run.
+ /// This is where it can query for any required services and load any non-graphic
+ /// related content. Calling base.Initialize will enumerate through any components
+ /// and initialize them as well.
+ ///
+ protected override void Initialize()
+ {
+ // TODO: Add your initialization logic here
+ roadPos = new Vector2(0, 0);
+ base.Initialize();
+ }
+
+ ///
+ /// LoadContent will be called once per game and is the place to load
+ /// all of your content.
+ ///
+ protected override void LoadContent()
+ {
+ // Create a new SpriteBatch, which can be used to draw textures.
+ spriteBatch = new SpriteBatch(GraphicsDevice);
+ road = Content.Load("road");
+ // TODO: use this.Content to load your game content here
+ }
+
+ ///
+ /// UnloadContent will be called once per game and is the place to unload
+ /// game-specific content.
+ ///
+ protected override void UnloadContent()
+ {
+ // TODO: Unload any non ContentManager content here
+ }
+
+ ///
+ /// Allows the game to run logic such as updating the world,
+ /// checking for collisions, gathering input, and playing audio.
+ ///
+ /// Provides a snapshot of timing values.
+ protected override void Update(GameTime gameTime)
+ {
+ if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
+ Exit();
+
+ // TODO: Add your update logic here
+ double time = gameTime.TotalGameTime.TotalMilliseconds / 1000 * Math.PI;
+ roadPos.X = (float) (225 + 200*Math.Sin(time));
+ roadPos.Y = (float)(225 + 200*Math.Cos(time));
+ base.Update(gameTime);
+ }
+
+ ///
+ /// This is called when the game should draw itself.
+ ///
+ /// Provides a snapshot of timing values.
+ protected override void Draw(GameTime gameTime)
+ {
+ GraphicsDevice.Clear(Color.CornflowerBlue);
+ spriteBatch.Begin();
+
+ spriteBatch.Draw(road, roadPos, Color.White);
+ spriteBatch.End();
+ // TODO: Add your drawing code here
+
+ base.Draw(gameTime);
+ }
+ }
+}
diff --git a/Trunk/MonoGameView/Icon.ico b/Trunk/MonoGameView/Icon.ico
new file mode 100644
index 0000000..7d9dec1
Binary files /dev/null and b/Trunk/MonoGameView/Icon.ico differ
diff --git a/Trunk/MonoGameView/MonoGameView.csproj b/Trunk/MonoGameView/MonoGameView.csproj
new file mode 100644
index 0000000..8fc56f6
--- /dev/null
+++ b/Trunk/MonoGameView/MonoGameView.csproj
@@ -0,0 +1,71 @@
+
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {EBE9431C-9B66-4300-B288-7A0F7B899415}
+ WinExe
+ Properties
+ MonoGameView
+ MonoGameView
+ 512
+ Windows
+ v4.5
+
+
+ x86
+ true
+ full
+ false
+ bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\
+ DEBUG;TRACE;WINDOWS
+ prompt
+ 4
+
+
+ x86
+ pdbonly
+ true
+ bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\
+ TRACE;WINDOWS
+ prompt
+ 4
+
+
+ Icon.ico
+
+
+ app.manifest
+
+
+
+
+
+
+
+
+ $(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Trunk/MonoGameView/Program.cs b/Trunk/MonoGameView/Program.cs
new file mode 100644
index 0000000..3b6aeb8
--- /dev/null
+++ b/Trunk/MonoGameView/Program.cs
@@ -0,0 +1,22 @@
+using System;
+
+namespace MonoGameView
+{
+#if WINDOWS || LINUX
+ ///
+ /// The main class.
+ ///
+ public static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ using (var game = new Game1())
+ game.Run();
+ }
+ }
+#endif
+}
diff --git a/Trunk/MonoGameView/Properties/AssemblyInfo.cs b/Trunk/MonoGameView/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..434fec3
--- /dev/null
+++ b/Trunk/MonoGameView/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MonoGameView")]
+[assembly: AssemblyProduct("MonoGameView")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("0ff0f801-46a1-4452-8feb-12cb0986ff52")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Trunk/MonoGameView/app.manifest b/Trunk/MonoGameView/app.manifest
new file mode 100644
index 0000000..86e21ed
--- /dev/null
+++ b/Trunk/MonoGameView/app.manifest
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true/pm
+
+
+
+