nie wiem co

This commit is contained in:
ryuga4 2019-05-13 13:40:52 +02:00
parent 68c3b811c0
commit 4aa62c1f78
2 changed files with 12 additions and 9 deletions

View File

@ -11,6 +11,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Content;
using System.Threading; using System.Threading;
using MonoGameView.DataModels.Models;
namespace CzokoŚmieciarka.MonoGameView.Algorithms namespace CzokoŚmieciarka.MonoGameView.Algorithms
{ {
@ -126,16 +127,18 @@ namespace CzokoŚmieciarka.MonoGameView.Algorithms
KeyValuePair<List<IStep>, int> Search(ContentManager content, GarbageCollector collector, ICloneable[,] grid, int length) KeyValuePair<List<IStep>, int> Search(ContentManager content, GarbageCollector collector, ICloneable[,] grid, int length)
{ {
//Thread.Sleep(100); Thread.Sleep(100);
/*this.Collector.Coords = collector.Coords; this.Collector.Coords = collector.Coords;
for (int x = 0; x < grid.GetLength(0); x++) for (int x = 0; x < grid.GetLength(0); x++)
{ {
for (int y = 0; y < grid.GetLength(1); y++) for (int y = 0; y < grid.GetLength(1); y++)
{ {
this.Grid[x, y] = grid[x, y]; this.Grid[x, y] = grid[x, y];
} }
} }
*/
Console.WriteLine(collector.HouseCounter); Console.WriteLine(collector.HouseCounter);
if (collector.Counter> 100 || length > 100) if (collector.Counter> 100 || length > 100)

View File

@ -90,11 +90,11 @@ namespace CzokoŚmieciarka.MonoGameView
stepN = 0; stepN = 0;
var dfs = new DFS(collector,grid); var dfs = new DFS(collector,grid);
steps = dfs.BestPath(Content, collector, grid); //steps = dfs.BestPath(Content, collector, grid);
//new Thread(delegate() { new Thread(delegate() {
// var x = dfs.BestPath(Content, collector, grid); var x = dfs.BestPath(Content, collector, grid);
//}).Start(); }).Start();
base.Initialize(); base.Initialize();
} }
@ -130,7 +130,7 @@ namespace CzokoŚmieciarka.MonoGameView
{ {
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit(); Exit();
/*
var elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds; var elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
timer -= elapsed; timer -= elapsed;
if (timer<0) if (timer<0)
@ -142,7 +142,7 @@ namespace CzokoŚmieciarka.MonoGameView
steps.RemoveAt(0); steps.RemoveAt(0);
} }
} }
*/
// TODO: Add your update logic here // TODO: Add your update logic here
base.Update(gameTime); base.Update(gameTime);