|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcommon.Table
tables.BlackjackTable
public class BlackjackTable
| Field Summary | |
|---|---|
static int |
HIT
Specifies that the player wants to hit. |
static int |
STAYING
Specifies that the player wants to stay. |
| Fields inherited from class common.Table |
|---|
deck, DRAW, FULL, hands, LOSS, NUMBER_OF_GAMES, numPlayers, players, started, type, WIN |
| Constructor Summary | |
|---|---|
BlackjackTable()
Default constructor for BlackjackTable that calls the default constructor of Table. |
|
BlackjackTable(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()
Called when the table is FULL. |
void |
handleMessage(java.lang.Object o,
int fromClientNum)
Handles incoming messages from players at this table. |
| Methods inherited from class common.Table |
|---|
addPlayer, getNextAvailableSlot, getType, initialize, removePlayer, removePlayer, sendResults, sendTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int HIT
public static final int STAYING
| Constructor Detail |
|---|
public BlackjackTable()
public BlackjackTable(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 - NetworkObject the incoming message.fromClientNum - int the player number of the player that sent this message.public void beginGame()
Table
beginGame in class Table
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||