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 a297f33..72141fe 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,6 +41,7 @@
+
diff --git a/Trunk/Components/CzokoŚmieciarka.AI_Naive/DFS.cs b/Trunk/Components/CzokoŚmieciarka.AI_Naive/DFS.cs
new file mode 100644
index 0000000..10571e8
--- /dev/null
+++ b/Trunk/Components/CzokoŚmieciarka.AI_Naive/DFS.cs
@@ -0,0 +1,109 @@
+using CzokoŚmieciarka.DataModels.Enums;
+using CzokoŚmieciarka.DataModels.Interfaces;
+using CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector;
+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;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CzokoŚmieciarka.AI_Naive
+{
+ public class DFS
+ {
+ public DFS()
+ {
+ }
+ int count = 0;
+
+
+ public List BestPath(AGarbageCollector collector, object[,] grid)
+ {
+ var r=Search(collector, grid, 0).Key;
+ Console.WriteLine(count);
+ return r;
+ }
+
+ List PossibleSteps(AGarbageCollector collector, object[,] grid)
+ {
+
+
+ var result = new List();
+ var moveSteps = new List()
+ {
+ new MoveStep(Direction.Up),
+ new MoveStep(Direction.Down),
+ new MoveStep(Direction.Left),
+ new MoveStep(Direction.Right)
+ };
+ var filteredMoveSteps = new List();
+ foreach (var item in moveSteps)
+ {
+ var copyCollector = (AGarbageCollector)collector.Clone();
+ var copyGrid = (object[,])grid.Clone();
+ try
+ {
+ item.Invoke(copyCollector, grid);
+ var gcx = copyCollector.Coords.X;
+ var gcy = copyCollector.Coords.Y;
+ if (grid[gcx, gcy] is IRoad1 || grid[gcx, gcy] is IGarbageLocalization || grid[gcx, gcy] is ADump)
+ {
+ result.Add(item);
+ }
+ }
+ catch (Exception e)
+ {
+
+ }
+ }
+
+ return result;
+ }
+
+ KeyValuePair, int> Search(AGarbageCollector collector, object[,] grid, int length)
+ {
+ count++;
+ if (length > 40) return new KeyValuePair, int>(new List(), length);
+ var possibleSteps = PossibleSteps(collector, grid);
+
+ foreach (var item in possibleSteps)
+ {
+ var copyCollector = (AGarbageCollector)collector.Clone();
+ var copyGrid = (object[,])grid.Clone();
+
+
+
+
+
+
+
+ //if (copyGrid[copyCollector.Coords.X, copyCollector.Coords.Y] is IRoad1) copyGrid[copyCollector.Coords.X, copyCollector.Coords.Y] = new Road2();
+ item.Invoke(copyCollector, copyGrid);
+ var s = Search(copyCollector, copyGrid, length + 1);
+ if (s.Key != null)
+ {
+ s.Key.Insert(0, item);
+ return s;
+ }
+ }
+ return new KeyValuePair, int>(null, length);
+ /*var min = int.MaxValue;
+ var min_index = 0;
+ for (int i = 0; i < mapped.Count; i++)
+ {
+ if (mapped.ElementAt(i).Value <= min)
+ {
+ min = mapped.ElementAt(i).Value;
+ min_index = i;
+ }
+ }
+ return mapped.ElementAt(min_index);
+ */
+
+
+ }
+ }
+}
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/CzokoŚmieciarka.DataModels.csproj b/Trunk/Components/CzokoŚmieciarka.DataModels/CzokoŚmieciarka.DataModels.csproj
index de4f401..d200d86 100644
--- a/Trunk/Components/CzokoŚmieciarka.DataModels/CzokoŚmieciarka.DataModels.csproj
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/CzokoŚmieciarka.DataModels.csproj
@@ -51,6 +51,8 @@
+
+
@@ -60,6 +62,8 @@
+
+
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/GarbageCollector/AGarbageCollector.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/GarbageCollector/AGarbageCollector.cs
index bb77904..c071ed9 100644
--- a/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/GarbageCollector/AGarbageCollector.cs
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/GarbageCollector/AGarbageCollector.cs
@@ -9,7 +9,7 @@ using CzokoŚmieciarka.DataModels.Models;
namespace CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector
{
- public abstract class AGarbageCollector : IGarbageCollector
+ public abstract class AGarbageCollector : IGarbageCollector, ICloneable
{
public AGarbageCollector(Coords startPosition, IEnumerable trashContainers, int columns, int rows)
{
@@ -57,9 +57,9 @@ namespace CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector
Coords.X += 1;
}
- public object Clone()
+ public virtual object Clone()
{
- return this.MemberwiseClone();
+ throw new NotImplementedException();
}
public IEnumerable TrashContainers { get; }
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IRoad1.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IRoad1.cs
new file mode 100644
index 0000000..a31b73c
--- /dev/null
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IRoad1.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 IRoad1
+ {
+ }
+}
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IRoad2.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IRoad2.cs
new file mode 100644
index 0000000..ee9254e
--- /dev/null
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IRoad2.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 IRoad2
+ {
+ }
+}
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IStep.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IStep.cs
index fa8c4ad..10f537f 100644
--- a/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IStep.cs
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/Interfaces/IStep.cs
@@ -1,7 +1,9 @@
-namespace CzokoŚmieciarka.DataModels.Interfaces
+using CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector;
+
+namespace CzokoŚmieciarka.DataModels.Interfaces
{
public interface IStep
{
- void Invoke();
+ void Invoke(IGarbageCollector collector, object [,] grid);
}
}
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Coords.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Coords.cs
index b1d9ede..b6d9c21 100644
--- a/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Coords.cs
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Coords.cs
@@ -34,6 +34,21 @@ namespace CzokoŚmieciarka.DataModels.Models
public static Coords operator -(Coords a, Coords b)
{
return new Coords(a.X - b.X, a.Y - b.Y);
- }
+ }
+
+ public override string ToString()
+ {
+ return base.ToString();
+ }
+
+ public override bool Equals(object obj)
+ {
+ return base.Equals(obj);
+ }
+
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
}
}
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Road1.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Road1.cs
new file mode 100644
index 0000000..88f8ec8
--- /dev/null
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Road1.cs
@@ -0,0 +1,13 @@
+using CzokoŚmieciarka.DataModels.Interfaces;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CzokoŚmieciarka.DataModels.Models
+{
+ public class Road1 :IRoad1
+ {
+ }
+}
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Road2.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Road2.cs
new file mode 100644
index 0000000..e9a4093
--- /dev/null
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Road2.cs
@@ -0,0 +1,13 @@
+using CzokoŚmieciarka.DataModels.Interfaces;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CzokoŚmieciarka.DataModels.Models
+{
+ public class Road2 : IRoad2
+ {
+ }
+}
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Steps/CollectStep.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Steps/CollectStep.cs
index 48d5a81..8c2d369 100644
--- a/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Steps/CollectStep.cs
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Steps/CollectStep.cs
@@ -10,19 +10,16 @@ namespace CzokoŚmieciarka.DataModels.Models.Steps
{
public class CollectStep : IStep
{
- public CollectStep(IGarbageCollector garbageCollector, IGarbageLocalization garbageLocalization, ITypeOfGarbage typeOfGarbage)
+ public CollectStep(ITypeOfGarbage typeOfGarbage)
{
- this._garbageCollector = garbageCollector;
- this._garbageLocalization = garbageLocalization;
this._typeOfGarbage = typeOfGarbage;
}
- private IGarbageCollector _garbageCollector;
private ITypeOfGarbage _typeOfGarbage;
- private IGarbageLocalization _garbageLocalization;
- public void Invoke()
+ public void Invoke(IGarbageCollector garbageCollector, object [,] grid)
{
+ /*
if(_garbageCollector.Coords != _garbageLocalization.Coords)
throw new WrongPositionException("Śmieciarka nie jest w miejscu oderbania śmieci");
@@ -33,6 +30,7 @@ namespace CzokoŚmieciarka.DataModels.Models.Steps
throw new TrashContainerNotFound($"Nie znaleziono kontenera na {_typeOfGarbage.GarbageType}.");
_garbageCollector.TrashContainers.First(t => t.TypeOfGarbage == _typeOfGarbage).AddGarbage(garbage);
+ */
}
}
}
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Steps/MoveStep.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Steps/MoveStep.cs
index 49ffe36..ba757ba 100644
--- a/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Steps/MoveStep.cs
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Steps/MoveStep.cs
@@ -11,17 +11,18 @@ namespace CzokoŚmieciarka.DataModels.Models.Steps
{
public class MoveStep : IStep
{
- public MoveStep(Direction direction, IGarbageCollector garbageCollector)
+ public MoveStep(Direction direction)
{
- this._garbageCollector = garbageCollector;
this._direction = direction;
}
private Direction _direction;
private IGarbageCollector _garbageCollector;
- public void Invoke()
+ public void Invoke(IGarbageCollector _garbageCollector, object[,] grid)
{
+ if(grid[_garbageCollector.Coords.X, _garbageCollector.Coords.Y] is Road1)
+ grid[_garbageCollector.Coords.X, _garbageCollector.Coords.Y] = new Road2();
switch (_direction)
{
case Direction.Up: _garbageCollector.MoveUp(); break;
diff --git a/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Steps/SpillStep.cs b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Steps/SpillStep.cs
index a9d8cb9..e898bf3 100644
--- a/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Steps/SpillStep.cs
+++ b/Trunk/Components/CzokoŚmieciarka.DataModels/Models/Steps/SpillStep.cs
@@ -10,19 +10,15 @@ namespace CzokoŚmieciarka.DataModels.Models.Steps
{
public class SpillStep : IStep
{
- public SpillStep(IGarbageCollector garbageCollector, ADump dump, ITypeOfGarbage typeOfGarbage)
+ public SpillStep(ITypeOfGarbage typeOfGarbage)
{
- this._garbageCollector = garbageCollector;
- this._dump = dump;
this._typeOfGarbage = typeOfGarbage;
}
-
- private IGarbageCollector _garbageCollector;
- private ADump _dump;
+
private ITypeOfGarbage _typeOfGarbage;
- public void Invoke()
- {
+ public void Invoke(IGarbageCollector garbageCollector, object [,] grid)
+ {/*
if(_garbageCollector.Coords != _dump.Coords)
throw new WrongPositionException("Śmieciarka nie na terenie podanego wyspiska");
@@ -36,7 +32,7 @@ namespace CzokoŚmieciarka.DataModels.Models.Steps
.Select(t => t.TakeGarbage())
.Aggregate((a, b) => a + b);
- _dump.AddGarbage(garbage);
+ _dump.AddGarbage(garbage);*/
}
}
}
diff --git a/Trunk/MonoGameView/Content/Content.mgcb b/Trunk/MonoGameView/Content/Content.mgcb
index 6a07ece..60deb1d 100644
--- a/Trunk/MonoGameView/Content/Content.mgcb
+++ b/Trunk/MonoGameView/Content/Content.mgcb
@@ -13,7 +13,7 @@
#---------------------------------- Content ---------------------------------#
-#begin intersection.png
+#begin collector.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
@@ -23,9 +23,9 @@
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
-/build:intersection.png
+/build:collector.png
-#begin road.png
+#begin grass.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
@@ -35,5 +35,41 @@
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
-/build:road.png
+/build:grass.png
+
+#begin house.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:house.png
+
+#begin road1.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:road1.png
+
+#begin road2.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:road2.png
diff --git a/Trunk/MonoGameView/Content/collector.png b/Trunk/MonoGameView/Content/collector.png
new file mode 100644
index 0000000..296e3a5
Binary files /dev/null and b/Trunk/MonoGameView/Content/collector.png differ
diff --git a/Trunk/MonoGameView/Content/garbageCollector.png b/Trunk/MonoGameView/Content/garbageCollector.png
deleted file mode 100644
index 3283e83..0000000
Binary files a/Trunk/MonoGameView/Content/garbageCollector.png and /dev/null differ
diff --git a/Trunk/MonoGameView/Content/grass.png b/Trunk/MonoGameView/Content/grass.png
new file mode 100644
index 0000000..f9f1991
Binary files /dev/null and b/Trunk/MonoGameView/Content/grass.png differ
diff --git a/Trunk/MonoGameView/Content/house.png b/Trunk/MonoGameView/Content/house.png
index c69da1e..b2bcc94 100644
Binary files a/Trunk/MonoGameView/Content/house.png and b/Trunk/MonoGameView/Content/house.png differ
diff --git a/Trunk/MonoGameView/Content/intersection.png b/Trunk/MonoGameView/Content/intersection.png
deleted file mode 100644
index c57ed66..0000000
Binary files a/Trunk/MonoGameView/Content/intersection.png and /dev/null differ
diff --git a/Trunk/MonoGameView/Content/intersectionRED.png b/Trunk/MonoGameView/Content/intersectionRED.png
deleted file mode 100644
index 3914a2d..0000000
Binary files a/Trunk/MonoGameView/Content/intersectionRED.png and /dev/null differ
diff --git a/Trunk/MonoGameView/Content/road.png b/Trunk/MonoGameView/Content/road1.png
similarity index 100%
rename from Trunk/MonoGameView/Content/road.png
rename to Trunk/MonoGameView/Content/road1.png
diff --git a/Trunk/MonoGameView/Content/road2.png b/Trunk/MonoGameView/Content/road2.png
new file mode 100644
index 0000000..ad1f45b
Binary files /dev/null and b/Trunk/MonoGameView/Content/road2.png differ
diff --git a/Trunk/MonoGameView/Game1.cs b/Trunk/MonoGameView/Game1.cs
index db4b0dd..8daffd8 100644
--- a/Trunk/MonoGameView/Game1.cs
+++ b/Trunk/MonoGameView/Game1.cs
@@ -1,9 +1,17 @@
-using Microsoft.Xna.Framework;
+using CzokoŚmieciarka.AI_Naive;
+using CzokoŚmieciarka.DataModels.Interfaces;
+using CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector;
+using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
+using CzokoŚmieciarka.DataModels.Models;
+using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
+using MonoGameView;
using System;
+using System.Collections.Generic;
+using System.Linq;
-namespace MonoGameView
+namespace CzokoŚmieciarka.MonoGameView
{
///
/// This is the main type for your game.
@@ -12,8 +20,16 @@ namespace MonoGameView
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
- Texture2D road;
+ Texture2D road1;
+ Texture2D road2;
+ Texture2D grass;
Vector2 roadPos;
+ float timer;
+ const float TIMER = 0.2f;
+ int stepN;
+ List steps;
+ GarbageCollector collector;
+ object[,] grid = new object[10, 10];
public Game1()
{
graphics = new GraphicsDeviceManager(this);
@@ -22,6 +38,8 @@ namespace MonoGameView
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
@@ -32,6 +50,24 @@ namespace MonoGameView
{
// TODO: Add your initialization logic here
roadPos = new Vector2(0, 0);
+ timer = 0.2f;
+ for (int x=0;x<10;x++)
+ {
+ for (int y=0;y<10;y++)
+ {
+ if (x % 2 == 0 || y % 2 == 0) grid[x, y] = new Road1();
+ else grid[x, y] = null;
+ }
+ }
+
+
+ collector = new GarbageCollector(Content,new Coords(0, 0), new List(), 10, 10);
+
+
+ stepN = 0;
+ var dfs = new DFS();
+ steps = dfs.BestPath(collector, grid);
+
base.Initialize();
}
@@ -43,7 +79,9 @@ namespace MonoGameView
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
- road = Content.Load("road");
+ road1 = Content.Load("road1");
+ road2 = Content.Load("road2");
+ grass = Content.Load("grass");
// TODO: use this.Content to load your game content here
}
@@ -65,11 +103,24 @@ namespace MonoGameView
{
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();
-
+ var elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
+ timer -= elapsed;
+ if (timer<0)
+ {
+ timer = TIMER;
+ if (steps.Any())
+ {
+ steps.First().Invoke(collector, grid);
+ steps.RemoveAt(0);
+ }
+ }
// 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);
}
@@ -82,7 +133,17 @@ namespace MonoGameView
GraphicsDevice.Clear(Color.CornflowerBlue);
spriteBatch.Begin();
- spriteBatch.Draw(road, roadPos, Color.White);
+ for (int x = 0; x < 10; x++)
+ {
+ for (int y = 0; y < 10; y++)
+ {
+ if (grid[x, y] is Road1) spriteBatch.Draw(road1, new Vector2(x*50,y*50), Color.White);
+ else if (grid[x,y] is Road2) spriteBatch.Draw(road2, new Vector2(x * 50, y * 50), Color.White);
+ else spriteBatch.Draw(grass, new Vector2(x * 50, y * 50), Color.White);
+ }
+ }
+ collector.Draw(spriteBatch);
+
spriteBatch.End();
// TODO: Add your drawing code here
diff --git a/Trunk/MonoGameView/GarbageCollector.cs b/Trunk/MonoGameView/GarbageCollector.cs
new file mode 100644
index 0000000..e2e11a2
--- /dev/null
+++ b/Trunk/MonoGameView/GarbageCollector.cs
@@ -0,0 +1,40 @@
+using CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector;
+using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
+using CzokoŚmieciarka.DataModels.Models;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MonoGameView
+{
+ public class GarbageCollector : AGarbageCollector
+ {
+ public Texture2D Image { get; set; }
+ public GarbageCollector(ContentManager content, Coords c, List l, int rows, int cols) : base(c,l,rows,cols)
+ {
+ Image = content.Load("collector");
+ }
+ public GarbageCollector(Texture2D image, Coords c, List l, int rows, int cols) : base(c, l, rows, cols)
+ {
+ Image = image;
+ }
+
+
+ public void Draw(SpriteBatch batch)
+ {
+ batch.Draw(Image, new Vector2(Coords.X*50, Coords.Y*50), Color.White);
+ }
+
+
+ public override object Clone()
+ {
+ var cloneList = new List();
+ return new GarbageCollector(Image, new Coords(Coords.X,Coords.Y), cloneList, rows,columns);
+ }
+ }
+}
diff --git a/Trunk/MonoGameView/MonoGameView.csproj b/Trunk/MonoGameView/MonoGameView.csproj
index 8fc56f6..318153e 100644
--- a/Trunk/MonoGameView/MonoGameView.csproj
+++ b/Trunk/MonoGameView/MonoGameView.csproj
@@ -1,5 +1,5 @@
-
+
Debug
@@ -13,7 +13,8 @@
MonoGameView
512
Windows
- v4.5
+ v4.6.1
+
x86
@@ -42,6 +43,7 @@
+
@@ -57,8 +59,23 @@
+
+
+
+ {10e77bbe-55e1-483d-a456-0e94eac9b24a}
+ CzokoŚmieciarka.AI_Naive
+
+
+ {a3d5da96-69d7-463f-b1ee-6fc70716e3b2}
+ CzokoŚmieciarka.DataModels.GeneralModels
+
+
+ {f2e11fee-c5ac-47d2-ba9c-819909b6dff7}
+ CzokoŚmieciarka.DataModels
+
+