prepare for hexagon display & other models
- display cell as hexagon is Display.mHexagon if set ( not default ) will need a checkbox to set this - various new models preparation...
This commit is contained in:
@@ -94,13 +94,13 @@ public class MazeCellParameters {
|
||||
public void drawWalls(Graphics g, int pX, int pY, short walls) {
|
||||
int x = offsetX + (int) (pX * width);
|
||||
int y = offsetY + (int) (pY * height);
|
||||
if ((pY == 0) && ((walls & Brick.UP) == Brick.UP))
|
||||
if ((pY == 0) && ( Brick.isFlagSet( Brick.UP, walls)))
|
||||
g.drawLine(x, y, x + (int) width, y);
|
||||
if ((walls & Brick.DOWN) == Brick.DOWN)
|
||||
if (Brick.isFlagSet( Brick.DOWN, walls))
|
||||
g.drawLine(x, y + (int) height, x + (int) width, y + (int) height);
|
||||
if ((walls & Brick.RIGHT) == Brick.RIGHT)
|
||||
if (Brick.isFlagSet( Brick.RIGHT, walls))
|
||||
g.drawLine(x + (int) width, y, x + (int) width, y + (int) height);
|
||||
if ((pX == 0) && ((walls & Brick.LEFT) == Brick.LEFT))
|
||||
if ((pX == 0) && (Brick.isFlagSet( Brick.LEFT, walls)))
|
||||
g.drawLine(x, y, x, y + (int) height);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user