common
Class Game

java.lang.Object
  extended by common.Game
All Implemented Interfaces:
java.io.Serializable

public class Game
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static java.lang.String BLACKJACK
          Specifies that the player wants to play Blackjack.
static java.lang.String HEARTS
          Specifies that the player wants to play Hearts.
static java.lang.String SPADES
          Specifies that the player wants to play Spades.
 
Constructor Summary
Game(java.lang.String g, boolean n, int p)
          Initializes a new Game object that specifies which game the player wants to play and if he wants to create a new table or not.
 
Method Summary
 java.lang.String getGame()
          Returns the game that the player wants to play.
 boolean getNewTable()
          Returns whether or not the player wants to create a new table.
 int getNumPlayers()
          Returns the number of players the Player wants at his Table if he's creating a new Table;
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLACKJACK

public static final java.lang.String BLACKJACK
Specifies that the player wants to play Blackjack.

See Also:
Constant Field Values

HEARTS

public static final java.lang.String HEARTS
Specifies that the player wants to play Hearts.

See Also:
Constant Field Values

SPADES

public static final java.lang.String SPADES
Specifies that the player wants to play Spades.

See Also:
Constant Field Values
Constructor Detail

Game

public Game(java.lang.String g,
            boolean n,
            int p)
Initializes a new Game object that specifies which game the player wants to play and if he wants to create a new table or not. If the player is creating a new table, he must specify the number of players that must be at that table before the game begins.

Parameters:
g - String Represents which game the player wants to play.
n - boolean Whether or not the player is creating a new Table. (True=new table)
p - int If the player is creating a new Table, specifies the amount of players the table must have before the game begins.
Method Detail

getGame

public java.lang.String getGame()
Returns the game that the player wants to play.

Returns:
String

getNewTable

public boolean getNewTable()
Returns whether or not the player wants to create a new table.

Returns:
boolean

getNumPlayers

public int getNumPlayers()
Returns the number of players the Player wants at his Table if he's creating a new Table;

Returns:
int