|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--au.com.solidsoftware.multimahjong.shared.Moves
The Moves class forms the storage unit to be sent to the
Referee, and is to be retrieved by other MMC to receive
all the necessary information that will keep them update to date. The
Moves class will contain the last discarded tile from the
current player, a flag to signal for Mahjong and a list of Kongs that they
may have declared.
Referee, Serialized Form| Field Summary | |
private Tile[] |
declaredKongs
List of tiles that have been declared by the current player. |
private int[] |
kongType
Type of declared Kong made with tile. |
private Tile |
lastDiscard
The last discarded tile. |
static int |
MAX_SETS
Maximum number of Sets expected to fill exposed or declared hands. |
| Constructor Summary | |
Moves()
Initialises the declaredKongs and kongType
arrays to null. |
|
| Method Summary | |
void |
insertDeclaredKong(Tile givenTile,
int givenType)
Inserts declare Kong and pung2Kong tiles in the next position in the list. |
void |
placeDiscard(Tile lastDiscard)
Inserts lastDiscard tile. |
Tile[] |
retrieveDeclaredKong()
Returns list of tiles that have been selected as declared Kongs or pung2Kong tiles. |
Tile |
retrieveDiscard()
Retrieves lastDiscard. |
int[] |
retrieveKongType()
Returns list of types that match each tile in the declared Kong list. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final int MAX_SETS
private Tile lastDiscard
private Tile[] declaredKongs
private int[] kongType
| Constructor Detail |
public Moves()
declaredKongs and kongType
arrays to null.| Method Detail |
public void placeDiscard(Tile lastDiscard)
lastDiscard tile.lastDiscard - last discarded tile from current player.public Tile retrieveDiscard()
lastDiscard.
public void insertDeclaredKong(Tile givenTile,
int givenType)
givenTile - tile that has been selected to declare Kong or
pung2Kong.givenType - move selected with tile.public Tile[] retrieveDeclaredKong()
public int[] retrieveKongType()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||