|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--au.com.solidsoftware.multimahjong.shared.Wall
This forms the representation of the wall in a game of Mahjong. The class
inserts given tiles into the back of the wall array and then draws from the
back when tile is needed. Two walls are stored- the ordinary and honour
walls. Tiles are drawn from the ordinary wall whenever a PICKUP
is made from the Game. Tiles are drawn from the honour Wall
whenever a player reveals or declares a Kong or when they extend a Pung into
a Kong.
| Field Summary | |
private Tile[] |
honourWall
Honour Wall of tiles |
private int |
tileCount
Number of tiles that remain in the ordinary Wall. |
private Tile[] |
tilesInWall
Ordinary Wall of tiles. |
| Constructor Summary | |
Wall()
Class constuctor- creates storage for the Wall tiles. |
|
| Method Summary | |
java.lang.Object |
clone()
Allows the a copy of the wall to be made by the MMC. |
Tile |
drawLooseTile()
Draws a tile from the back of the honour wall. |
Tile |
drawTile()
Draws a tile from the back of the ordinary wall. |
int |
getTileCount()
Returns the tile count. |
void |
insertLooseTile(Tile tile)
Inserts a new tile at the end of the honour wall. |
void |
insertTile(Tile tile)
Inserts a new tile at the end of the ordinary wall. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private Tile[] tilesInWall
private Tile[] honourWall
private int tileCount
| Constructor Detail |
public Wall()
| Method Detail |
public java.lang.Object clone()
public void insertTile(Tile tile)
tile - New tile to insert into the ordinary wall.public Tile drawTile()
public void insertLooseTile(Tile tile)
tile - New tile to insert into the honour wall.public Tile drawLooseTile()
public int getTileCount()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||