nie wiem co
This commit is contained in:
parent
68c3b811c0
commit
4aa62c1f78
@ -11,6 +11,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using System.Threading;
|
||||
using MonoGameView.DataModels.Models;
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
//Thread.Sleep(100);
|
||||
/*this.Collector.Coords = collector.Coords;
|
||||
Thread.Sleep(100);
|
||||
this.Collector.Coords = collector.Coords;
|
||||
|
||||
for (int x = 0; x < grid.GetLength(0); x++)
|
||||
{
|
||||
for (int y = 0; y < grid.GetLength(1); y++)
|
||||
{
|
||||
|
||||
this.Grid[x, y] = grid[x, y];
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
Console.WriteLine(collector.HouseCounter);
|
||||
|
||||
if (collector.Counter> 100 || length > 100)
|
||||
|
@ -90,11 +90,11 @@ namespace CzokoŚmieciarka.MonoGameView
|
||||
|
||||
stepN = 0;
|
||||
var dfs = new DFS(collector,grid);
|
||||
steps = dfs.BestPath(Content, collector, grid);
|
||||
//new Thread(delegate() {
|
||||
// var x = dfs.BestPath(Content, collector, grid);
|
||||
//steps = dfs.BestPath(Content, collector, grid);
|
||||
new Thread(delegate() {
|
||||
var x = dfs.BestPath(Content, collector, grid);
|
||||
|
||||
//}).Start();
|
||||
}).Start();
|
||||
|
||||
base.Initialize();
|
||||
}
|
||||
@ -130,7 +130,7 @@ namespace CzokoŚmieciarka.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)
|
||||
@ -142,7 +142,7 @@ namespace CzokoŚmieciarka.MonoGameView
|
||||
steps.RemoveAt(0);
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
// TODO: Add your update logic here
|
||||
|
||||
base.Update(gameTime);
|
||||
|
Loading…
Reference in New Issue
Block a user