static public String toString( WallName name ) { switch(name) { case WallName.Bed: return "床"; case WallName.Door: return "門"; case WallName.Clock: return "時鐘"; case WallName.Number: return "數字牆"; } return "Error Wall Name"; }
public WallName getRelDirWall( WallName name , CondDir dir ) { int idx = getWallIndex(name); idx = getRelDirWallIndex(idx, dir); return wall[idx].name; }
public bool checkVaild( WallName a , WallName b , CondDir dir ) { int idxA = getWallIndex(a); int idxB = getWallIndex(b); return getRelDirWallIndex(idxA, dir) == idxB; }
public int getWallIndex(WallName name) { for(int i=0;i<4;++i) { if (wall[i].name == name) return i; } return -1; }
public bool isTopFireLighting( WallName nearWallName , CondDir dir , bool bFaceWall ) { int idx = getWallIndex(nearWallName); return bTopFireLighting[ getRelDirIndex( idx , dir , bFaceWall ) ]; }