added network buttons to the menu and changed som small things
This commit is contained in:
parent
a289d96d6a
commit
a0363aa3d8
7 changed files with 35 additions and 9 deletions
|
|
@ -32,7 +32,7 @@ public class AStar{
|
|||
}
|
||||
|
||||
public List<AStarNode> startSearch(Vector2i start, Vector2i goal){
|
||||
//map[goal.getX()][goal.getY()].setBlocked(false);
|
||||
//checks that the start and goul are inside the map
|
||||
if(start.getX() >= map.length)
|
||||
start.setX(map.length-1);
|
||||
if(start.getX() < 0)
|
||||
|
|
@ -52,6 +52,8 @@ public class AStar{
|
|||
goal.setY(map[0].length-1);
|
||||
if(goal.getY() < 0)
|
||||
goal.setY(0);
|
||||
|
||||
map[goal.getX()][goal.getY()].setBlocked(false);
|
||||
return pathfinder.findPath(map[start.getX()][start.getY()], map[goal.getX()][goal.getY()]);
|
||||
}
|
||||
|
||||
|
|
@ -90,7 +92,7 @@ public class AStar{
|
|||
|
||||
if(!InGameState.getMap().isPosEmpty(x, y)) {
|
||||
map[x][y].setBlocked(true);
|
||||
MultiPrintStream.out.print(1);
|
||||
MultiPrintStream.out.print(""+1);
|
||||
}
|
||||
else MultiPrintStream.out.print(""+0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue