|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcommon.Table
tables.SpadesTable
public class SpadesTable
| Field Summary |
|---|
| Fields inherited from class common.Table |
|---|
deck, DRAW, FULL, hands, LOSS, NUMBER_OF_GAMES, numPlayers, players, started, type, WIN |
| Constructor Summary | |
|---|---|
SpadesTable()
Default constructor for SpadesTable that calls the default constructor of Table. |
|
SpadesTable(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 the removePlayer in Table. |
| 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 SpadesTable()
public SpadesTable(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 game that is being 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 | ||||||||