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:
@@ -2,6 +2,7 @@ package org.artisanlogiciel.games.maze.model;
|
||||
|
||||
import org.artisanlogiciel.games.maze.Brick;
|
||||
import org.artisanlogiciel.games.maze.MovesProvider;
|
||||
import org.artisanlogiciel.games.maze.Position;
|
||||
import org.artisanlogiciel.games.maze.WallsProvider;
|
||||
|
||||
public class LineColumnModel
|
||||
@@ -40,6 +41,10 @@ public class LineColumnModel
|
||||
return c;
|
||||
}
|
||||
|
||||
public short getWalls(Position cell) {
|
||||
return getWalls(cell.getX(),cell.getY());
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getWalls(int x, int y) {
|
||||
return (short) (
|
||||
|
||||
Reference in New Issue
Block a user