draging mouse with button pushed over maze clear walls
warning this break resolving ( endless => hang ) TO FIX.
This commit is contained in:
@@ -61,6 +61,7 @@ public class LabyModel implements WallsProvider
|
||||
|
||||
private int width;
|
||||
private int height;
|
||||
// wall flags + status flags for each position (x,y)
|
||||
private short[][] t;
|
||||
private int depth = 0;
|
||||
/**
|
||||
@@ -114,6 +115,17 @@ public class LabyModel implements WallsProvider
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
// FIXME FULLY BREAK RESOLVING...
|
||||
public void noWalls(int x, int y)
|
||||
{
|
||||
if ((x > 0) && (x < width) && (y > 0) && (y < height))
|
||||
{
|
||||
// t[x][y] |= DIRECTION | VERTICAL | POSITIVE | HORIZONTAL | NEGATIVE | LEFT | RIGHT | UP | DOWN;
|
||||
t[x][y] |= DIRECTION | VERTICAL | POSITIVE | HORIZONTAL | NEGATIVE;
|
||||
t[x][y] |= LEFT | RIGHT | UP | DOWN;
|
||||
}
|
||||
}
|
||||
|
||||
// entry and exit can be outside the model boundaries a one x or one y out.
|
||||
public boolean addEntryOrExit(int x, int y)
|
||||
{
|
||||
@@ -395,7 +407,8 @@ public class LabyModel implements WallsProvider
|
||||
{
|
||||
for (int x = 0; x < width; x++)
|
||||
{
|
||||
t[x][y] &= ~OPEN;
|
||||
// resetCell(x,y);
|
||||
t[x][y] &= ~OPEN;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user