This commit is contained in:
ryuga4 2019-05-13 17:34:23 +02:00
parent a70153a4d3
commit e7e3658c97
3 changed files with 5 additions and 5 deletions

View File

@ -142,14 +142,14 @@ namespace MonoGameView.Algorithms
foreach (var item in nodes)
{
// Thread.Sleep(100);
/*this.Collector.Coords = item.Item2.Coords;
this.Collector.Coords = item.Item2.Coords;
for (int x = 0; x < item.Item3.GetLength(0); x++)
{
for (int y = 0; y < item.Item3.GetLength(1); y++)
{
this.Grid[x, y] = item.Item3[x, y];
}
}*/
}
if (Houses.All(c => (item.Item3[c.X, c.Y] as IGarbageLocalization).TrashCans.All(j => j.FillPercent == 0.0))
&&

View File

@ -127,7 +127,7 @@ namespace CzokoŚmieciarka.MonoGameView.Algorithms
KeyValuePair<List<IStep>, int> Search(ContentManager content, GarbageCollector collector, ICloneable[,] grid, int length)
{
Thread.Sleep(100);
//Thread.Sleep(100);
this.Collector.Coords = collector.Coords;
for (int x = 0; x < grid.GetLength(0); x++)

View File

@ -33,7 +33,7 @@ namespace CzokoŚmieciarka.MonoGameView
MapLoader mapLoader = new MapLoader();
Vector2 roadPos;
float timer;
const float TIMER = 0.1f;
const float TIMER = 0.001f;
int stepN;
List<IStep> steps;
GarbageCollector collector;
@ -93,7 +93,7 @@ namespace CzokoŚmieciarka.MonoGameView
stepN = 0;
var dfs = new DFS(collector,grid);
var dfs = new BFS(collector,grid);
//steps = dfs.BestPath(Content, collector, grid);
new Thread(delegate() {
var x = dfs.BestPath(Content, collector, grid);