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:
philippe lhardy
2020-12-27 15:40:22 +01:00
parent e146199ba0
commit afbe26065b
15 changed files with 403 additions and 26 deletions

View File

@@ -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);
}