refactoring, deploy Position and XYGridIterator
- try to use more Position instead of (x,y) - create PositionWithDpeth for its specific usage in path finding - create a XYGridITerator that walk cells from grid X then Y.
This commit is contained in:
@@ -27,6 +27,11 @@ public class LabyMap implements WallsProvider
|
||||
return getAt(x, y).getWalls();
|
||||
}
|
||||
|
||||
public short getWalls(Position cell)
|
||||
{
|
||||
return getAt(cell.getX(), cell.getY()).getWalls();
|
||||
}
|
||||
|
||||
public int getWidth()
|
||||
{
|
||||
return tileMap[0].length;
|
||||
|
||||
Reference in New Issue
Block a user