prepare for hand drawing with maze.

This commit is contained in:
philippe lhardy
2017-12-01 22:20:33 +01:00
parent eeb1172f88
commit 7deeb203ff
3 changed files with 37 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
package org.artisanlogiciel.games;
/** position of a cell with maze */
public class Position
{
private int x, y;
@@ -38,4 +39,20 @@ public class Position
{
return "(" + x + "," + y + ")" + "/" + depth;
}
public boolean equals(Object other)
{
// disregards depth
if (other instanceof Position )
{
Position p = (Position) other;
return (p.getX() == x) && (p.getY() == y);
}
else
{
return false;
}
}
}