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:
@@ -1,9 +1,17 @@
|
||||
package org.artisanlogiciel.games.maze;
|
||||
|
||||
public class BrickTextMapping
|
||||
extends Brick {
|
||||
import static org.artisanlogiciel.games.maze.Brick.*;
|
||||
|
||||
public static String getDirLine()
|
||||
public class BrickTextMapping {
|
||||
|
||||
private String charmap;
|
||||
|
||||
public BrickTextMapping(String pCharMap)
|
||||
{
|
||||
charmap = pCharMap;
|
||||
}
|
||||
|
||||
public static String getDefaultDirLine()
|
||||
{
|
||||
char dir[] = new char[16];
|
||||
String s = "";
|
||||
@@ -43,18 +51,22 @@ extends Brick {
|
||||
|
||||
}
|
||||
|
||||
public static char getChar(short walls)
|
||||
public static char getDefaultChar(short walls)
|
||||
{
|
||||
// return getDirLine().charAt(walls & 0xFFF0);
|
||||
return getDirLine().charAt(walls);
|
||||
return getDefaultDirLine().charAt(walls);
|
||||
}
|
||||
|
||||
public static char getChar(Brick brick)
|
||||
public static char getDefaultChar(Brick brick)
|
||||
{
|
||||
// return getDirLine().charAt(walls & 0xFFF0);
|
||||
return getChar(brick.walls);
|
||||
return getDefaultChar(brick.walls);
|
||||
}
|
||||
|
||||
public char getChar(Brick brick)
|
||||
{
|
||||
return charmap.charAt((brick.walls)*0xf);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user