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:
@@ -1,6 +1,7 @@
|
||||
package org.artisanlogiciel.games.maze.model;
|
||||
|
||||
import org.artisanlogiciel.games.maze.MovesProvider;
|
||||
import org.artisanlogiciel.games.maze.Position;
|
||||
import org.artisanlogiciel.games.maze.WallsProvider;
|
||||
|
||||
/**
|
||||
@@ -98,6 +99,12 @@ public class HalfSquareRasterModel
|
||||
);
|
||||
}
|
||||
|
||||
public short getWalls(Position cell)
|
||||
{
|
||||
return getWalls(cell.getX(), cell.getY());
|
||||
}
|
||||
|
||||
|
||||
public short getMoves(int x, int y)
|
||||
{
|
||||
// moves are where there is no walls ...
|
||||
|
||||
Reference in New Issue
Block a user