|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectus.asciiroth.client.board.WriterBase
us.asciiroth.client.board.BoardWriter
public class BoardWriter
Start with this storing in memory as a JSON data structure.
Field Summary | |
---|---|
static java.lang.String |
CREATOR
If this is the start board, it can encode the creator of the scenario. |
static java.lang.String |
DESCRIPTION
If this is the start board, it can encode a description of the scenario. |
static java.lang.String |
DIAGRAM_KEY
The property specifying a diagram described using arbitrarily chosen symbols for each cell of the board. |
static java.lang.String |
KEY_KEY
For a given piece, the String key that describes the piece (essentially its serialization for the board JSON). |
static java.lang.String |
MUSIC
Not currently implemented, but there is a property to specify an mp3 file in case music is added later. |
static java.lang.String |
OUTSIDE_MAP
The property specifying whether the map represents an outside or inside area (the player and other pieces may be drawn differently as a result). |
static java.lang.String |
PIECES_KEY
An array of JSON objects that describe the pieces and their location on the board. |
static java.lang.String |
SCENARIO_NAME
If this is the start board, it can encode the name of the scenario for the load feature. |
static java.lang.String |
START_INVENTORY
For testing purposes, if the player starts on this map rather than entering from another map, the player can be assigned a starting inventory. |
static java.lang.String |
START_X_KEY
If provided, and the player does not enter from another map, this is the starting X position of the player on the board. |
static java.lang.String |
START_Y_KEY
If provided, and the player does not enter from another map, this is the starting Y position of the player on the board. |
static java.lang.String |
TERRAIN_KEY
A property specifying a mapping between the symbols in the diagram and the terrain they represent. |
static java.lang.String |
X_KEY
For a given piece, its X coordinate on the board. |
static java.lang.String |
Y_KEY
For a given piece, its Y coordinate on the board. |
Constructor Summary | |
---|---|
BoardWriter()
|
Method Summary | |
---|---|
java.lang.String |
write(Board board,
boolean preserveMetadata)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CREATOR
public static final java.lang.String DESCRIPTION
public static final java.lang.String DIAGRAM_KEY
DIAGRAM_KEY
portion of the map.
public static final java.lang.String KEY_KEY
public static final java.lang.String MUSIC
public static final java.lang.String OUTSIDE_MAP
public static final java.lang.String PIECES_KEY
public static final java.lang.String SCENARIO_NAME
public static final java.lang.String START_INVENTORY
public static final java.lang.String START_X_KEY
public static final java.lang.String START_Y_KEY
public static final java.lang.String TERRAIN_KEY
Terrain
piece,
or an array of pieces, starting with a terrain piece but capable of including
items and an agent as well. The latter is useful because it allows the diagram
to indicate where items and agents should be placed, rather than having to
specify their x/y coordinates separately.
public static final java.lang.String X_KEY
public static final java.lang.String Y_KEY
Constructor Detail |
---|
public BoardWriter()
Method Detail |
---|
public java.lang.String write(Board board, boolean preserveMetadata)
|
0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© 2009 Alx Dark