jackson databind import
- and some reowrk to use Position more than (x,y) parameters
This commit is contained in:
@@ -2,8 +2,6 @@ package org.artisanlogiciel.games.maze;
|
||||
|
||||
public class XYGridIterator {
|
||||
|
||||
final static Position stepX = new Position(1,0);
|
||||
final static Position stepY = new Position( 0,1);
|
||||
|
||||
Position min;
|
||||
Position max;
|
||||
@@ -31,10 +29,10 @@ public class XYGridIterator {
|
||||
if ( next != null)
|
||||
{
|
||||
Position current = new Position(next);
|
||||
next.doTranslate(stepX);
|
||||
next.doTranslate(Position.stepX);
|
||||
if ( next.getX() >= max.getX()) {
|
||||
if (next.getY() < max.getY() - 1) {
|
||||
next.setX(min.getX()).doTranslate(stepY);
|
||||
next.setX(min.getX()).doTranslate(Position.stepY);
|
||||
} else {
|
||||
next = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user