1
0
forked from s425077/PotatoPlan
JoelForkTest/Game1/Sources/Pathing/A-Star/Astar.cs
2020-05-03 13:05:05 +02:00

35 lines
773 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
class Astar
{
private Vector2 tractorPos;
private Vector2 housePos;
private Crops[,] crops;
private Vector2 Size;
private PriorityQueue allPaths;
public void update(Crops[,] newCrops, Vector2 newSize, Vector2 newTractorPos, Vector2 newHousePos)
{
tractorPos = new Vector2((int)newTractorPos.X, (int)newTractorPos.Y);
housePos = new Vector2((int)newHousePos.X, (int)newHousePos.Y);
crops = newCrops;
Size = newSize;
}
public void findPath()
{
int i = 1;
}
public Path getOptimalPath()
{
return allPaths.Peek();
}
}