|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcommon.Table
tables.HeartsTable
public class HeartsTable
| Field Summary |
|---|
| Fields inherited from class common.Table |
|---|
deck, DRAW, FULL, hands, LOSS, NUMBER_OF_GAMES, numPlayers, players, started, type, WIN |
| Constructor Summary | |
|---|---|
HeartsTable()
Default constructor for HeartsTable that calls the default constructor of Table. |
|
HeartsTable(int numPlayers,
java.lang.String type)
Constructs a new Table with the specified amount of players needed at this Table to start the game and the ServerThread associated with the first player (master) at this Table. |
|
| Method Summary | |
|---|---|
void |
beginGame()
Deals 13 cards to each player and puts them in each player's hand. |
void |
handleMessage(java.lang.Object o,
int fromClientNum)
Handles incoming messages from players at this table. |
void |
removePlayer(ServerThread player)
Overrides removePlayer in Table so when the player leaves, it also removes his score. |
| Methods inherited from class common.Table |
|---|
addPlayer, getNextAvailableSlot, getType, initialize, removePlayer, sendResults, sendTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HeartsTable()
public HeartsTable(int numPlayers,
java.lang.String type)
numPlayers - int is the number of players needed at this Table to start the game.type - String is the type of game played at this table.
at this Table.| Method Detail |
|---|
public void handleMessage(java.lang.Object o,
int fromClientNum)
handleMessage in class Tableo - Object the incoming message.fromClientNum - int the player number of the player that sent this message.public void beginGame()
beginGame in class Tablepublic void removePlayer(ServerThread player)
removePlayer in class Tableplayer - ServerThread that left the table.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||