org.starhope.appius.game.maze
Class MazeRoom

java.lang.Object
  extended by org.starhope.appius.sql.SQLPeerDatum
      extended by org.starhope.appius.game.Room
          extended by org.starhope.appius.game.maze.MazeRoom
All Implemented Interfaces:
Serializable, Comparable<Object>, AbstractRoom, HasVariables
Direct Known Subclasses:
CastleDungeon.CastleDungeonRoom, CastleJoustMaze.CastleJoustMazeRoom, LavaMaze.LavaMazeRoom

public abstract class MazeRoom
extends Room

WRITEME

Author:
brpocock@star-hope.org
See Also:
Serialized Form

Field Summary
private  org.starhope.appius.geometry.Coord2D[] donors
          WRITEME
private  boolean[] doorLocked
          WRITEME
(package private)  int[] doorTileX
          WRITEME
(package private)  int[] doorTileY
          WRITEME
private  AbstractRoom[] doorTo
          WRITEME
protected  int maxX
          WRITEME: Document this brpocock@star-hope.org
protected  int maxY
          WRITEME: Document this brpocock@star-hope.org
protected  int numDonors
          WRITEME: Document this brpocock@star-hope.org
protected  int numDoors
          WRITEME: Document this brpocock@star-hope.org
private static long serialVersionUID
          Java serialization unique ID
private static double tile_height
          height of a tile
private static double tile_width
          width of a tile
private static double tile_x_offset
          WRITEME
private static double tile_x_start
          WRITEME: Document this brpocock@star-hope.org
private static double tile_y_offset
          WRITEME
private static double tile_y_start
          WRITEME: Document this brpocock@star-hope.org
private  int[][] tileArray
          WRITEME
 
Fields inherited from class org.starhope.appius.game.Room
MAX_X, MAX_Y, myID
 
Constructor Summary
MazeRoom(AbstractZone abstractZone, int i)
          WRITEME: Document this constructor brpocock@star-hope.org
 
Method Summary
private  void clearAllDoors()
          WRITEME
private  void clearAllTiles()
          WRITEME
(package private)  void closeDoor(int i)
          WRITEME
 void createTile()
          WRITEME: Document this method brpocock@star-hope.org
 void createTile(org.starhope.appius.geometry.Coord2D donor)
          WRITEME: Document this method brpocock@star-hope.org
 void destroyTile()
          WRITEME: Document this method brpocock@star-hope.org
 boolean equals(Object other)
          This is an overriding method.
abstract  String getMonikerPrefix()
          WRITEME: Document this method brpocock@star-hope.org
private  int getOffsetX(int x, int y)
          WRITEME: Document this method brpocock@star-hope.org
private  int getOffsetY(int x, int y)
          WRITEME: Document this method brpocock@star-hope.org
abstract  String getRoomFilename()
          WRITEME: Document this method brpocock@star-hope.org
private  String getTileAnimVar(int x, int y)
           
private  String getTilePoly(int x, int y)
          generate the polygon string describing the surface of a given tile to the client
private  String getTileZoneVar(int x, int y)
           
 int hashCode()
          This is an overriding method.
 boolean hasOpenDoor()
          WRITEME: Document this method brpocock@star-hope.org
private  void hideDoor(int i)
          WRITEME
private  boolean isConnected(int x1, int y1, int x2, int y2)
          WRITEME: Document this method brpocock@star-hope.org
 int openDoor(AbstractRoom otherRoom)
          WRITEME: Document this method brpocock@star-hope.org
(package private)  void openDoor(int i, AbstractRoom abstractRoom)
          WRITEME
private  void setTileAbsent(int x, int y)
          WRITEME: Document this method brpocock@star-hope.org
private  void setTileDangerous(int x, int y)
          WRITEME: Document this method brpocock@star-hope.org
private  void setTileWalkable(int x, int y)
          WRITEME: Document this method brpocock@star-hope.org
private  boolean testTileForConnection(boolean[][] connected, int x, int y)
          WRITEME: Document this method brpocock@star-hope.org
private  boolean testTilesAround(boolean[][] connected, int x, int y)
          WRITEME: Document this method brpocock@star-hope.org
 
Methods inherited from class org.starhope.appius.game.Room
add, broadcast, canWalk, contains, create, create, deleteVariable, destroySelf, equals, flush, fromJSON, getActiveDecorations, getAllListeners, getAllRooms, getAllUsers, getByMoniker, getCacheUniqueID, getDebugName, getEventSpaces, getFilename, getGameEvent, getGameEvents, getID, getLag, getListeners, getMaxUsers, getMoniker, getMusic, getName, getNextID, getOverlay, getOwner, getPlaceStringByName, getPlaceStrings, getPlaceZoneNumber, getRoomIndex, getRoomJoinJSON, getRoomJoinSFSXML, getSky, getSuperTootBots, getTitle, getUserCount, getVariable, getVariables, getWalkableSpace, getZone, goTo, goTo, isLimbo, isSkyVisible, join, notifyUserAction, part, pushToAllZones, pushToZone, putHere, remove, removeVariable, resetVariables, saveRoomVars, sendGameAction, sendPublicMessage, set, setFilename, setLimbo, setMoniker, setMusic, setOverlay, setOwner, setRoomIndex, setRoomVars, setSky, setSkyVisible, setTitle, setVariable, setVariable, setVariables, speak_actually, toJSON, trace, userNearest
 
Methods inherited from class org.starhope.appius.sql.SQLPeerDatum
changed, compareTo, findInCache, get, saveInCache, set
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Java serialization unique ID

See Also:
Constant Field Values

tile_height

private static final double tile_height
height of a tile

See Also:
Constant Field Values

tile_width

private static final double tile_width
width of a tile

See Also:
Constant Field Values

tile_x_offset

private static final double tile_x_offset
WRITEME

See Also:
Constant Field Values

tile_x_start

private static final double tile_x_start
WRITEME: Document this brpocock@star-hope.org

See Also:
Constant Field Values

tile_y_offset

private static final double tile_y_offset
WRITEME

See Also:
Constant Field Values

tile_y_start

private static final double tile_y_start
WRITEME: Document this brpocock@star-hope.org

See Also:
Constant Field Values

donors

private final org.starhope.appius.geometry.Coord2D[] donors
WRITEME


doorLocked

private final boolean[] doorLocked
WRITEME


doorTileX

final int[] doorTileX
WRITEME


doorTileY

final int[] doorTileY
WRITEME


doorTo

private final AbstractRoom[] doorTo
WRITEME


maxX

protected int maxX
WRITEME: Document this brpocock@star-hope.org


maxY

protected int maxY
WRITEME: Document this brpocock@star-hope.org


numDonors

protected int numDonors
WRITEME: Document this brpocock@star-hope.org


numDoors

protected int numDoors
WRITEME: Document this brpocock@star-hope.org


tileArray

private final int[][] tileArray
WRITEME

Constructor Detail

MazeRoom

public MazeRoom(AbstractZone abstractZone,
                int i)
WRITEME: Document this constructor brpocock@star-hope.org

Parameters:
abstractZone - WRITEME
i - WRITEME
Method Detail

clearAllDoors

private void clearAllDoors()
WRITEME


clearAllTiles

private void clearAllTiles()
WRITEME


closeDoor

void closeDoor(int i)
WRITEME

Parameters:
i - WRITEME

createTile

public void createTile()
WRITEME: Document this method brpocock@star-hope.org


createTile

public void createTile(org.starhope.appius.geometry.Coord2D donor)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
donor - the donor creating a tile

destroyTile

public void destroyTile()
WRITEME: Document this method brpocock@star-hope.org


equals

public boolean equals(Object other)
Description copied from class: Room
This is an overriding method.

Overrides:
equals in class Room
See Also:
Room.equals(org.starhope.appius.game.AbstractRoom)

getMonikerPrefix

public abstract String getMonikerPrefix()
WRITEME: Document this method brpocock@star-hope.org

Returns:
WRITEME

getOffsetX

private int getOffsetX(int x,
                       int y)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
x - WRITEME
y - WRITEME
Returns:
WRITEME

getOffsetY

private int getOffsetY(int x,
                       int y)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
x - WRITEME
y - WRITEME
Returns:
WRITEME

getRoomFilename

public abstract String getRoomFilename()
WRITEME: Document this method brpocock@star-hope.org

Returns:
filename

getTileAnimVar

private String getTileAnimVar(int x,
                              int y)
Parameters:
x - WRITEME
y - WRITEME
Returns:
WRITEME

getTilePoly

private String getTilePoly(int x,
                           int y)
generate the polygon string describing the surface of a given tile to the client

Parameters:
x - the tile's x
y - the tile's y
Returns:
a polygon string in a format understood by the client

getTileZoneVar

private String getTileZoneVar(int x,
                              int y)
Parameters:
x - WRITEME
y - WRITEME
Returns:
WRITEME

hashCode

public int hashCode()
Description copied from class: Room
This is an overriding method.

Specified by:
hashCode in interface AbstractRoom
Overrides:
hashCode in class Room
See Also:
Room.hashCode()

hasOpenDoor

public boolean hasOpenDoor()
WRITEME: Document this method brpocock@star-hope.org

Returns:
WRITEME

hideDoor

private void hideDoor(int i)
WRITEME

Parameters:
i - WRITEME

isConnected

private boolean isConnected(int x1,
                            int y1,
                            int x2,
                            int y2)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
x1 - WRITEME
y1 - WRITEME
x2 - WRITEME
y2 - WRITEME
Returns:
WRITEME

openDoor

public int openDoor(AbstractRoom otherRoom)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
otherRoom - WRITEME
Returns:
the door that was opened, or -1 if there wasn't a door to open

openDoor

void openDoor(int i,
              AbstractRoom abstractRoom)
        throws IndexOutOfBoundsException
WRITEME

Parameters:
i - WRITEME
abstractRoom - WRITEME
Throws:
IndexOutOfBoundsException - WRITEME

setTileAbsent

private void setTileAbsent(int x,
                           int y)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
x - WRITEME
y - WRITEME

setTileDangerous

private void setTileDangerous(int x,
                              int y)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
x - WRITEME
y - WRITEME

setTileWalkable

private void setTileWalkable(int x,
                             int y)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
x - x
y - y

testTileForConnection

private boolean testTileForConnection(boolean[][] connected,
                                      int x,
                                      int y)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
connected - WRITEME
x - WRITEME
y - WRITEME
Returns:
WRITEME

testTilesAround

private boolean testTilesAround(boolean[][] connected,
                                int x,
                                int y)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
connected - WRITEME
x - WRITEME
y - WRITEME
Returns:
WRITEME