edu.cmu.mse17654.Casino
Class FloorImpl

java.lang.Object
  |
  +--org.omg.PortableServer.Servant
        |
        +--edu.cmu.mse17654.Casino.FloorPOA
              |
              +--edu.cmu.mse17654.Casino.FloorImpl
All Implemented Interfaces:
edu.cmu.mse17654.Casino.FloorOperations, org.omg.CORBA.portable.InvokeHandler

public class FloorImpl
extends edu.cmu.mse17654.Casino.FloorPOA

The "floor" of the casino, containing many tables.


Constructor Summary
FloorImpl(edu.cmu.mse17654.Casino.PlayerDB db, edu.cmu.mse17654.Casino.Bank bank, edu.cmu.mse17654.Casino.Tables tables)
          The constructor for the Floor class.
 
Method Summary
 edu.cmu.mse17654.Casino.Bank getBank(int playerID)
          The player requests the Bank interface.
 edu.cmu.mse17654.Casino.Tables getTables(int playerID)
          The player requests the Tables interface.
 int register(java.lang.String playerName)
          The new or returning player registers with the system to start Category: Baseline Behavior: A player client uses this method to register for a session at the casino server. Clients: Player
 void unregister(int playerID)
          The player asks to leave the game.
 
Methods inherited from class edu.cmu.mse17654.Casino.FloorPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloorImpl

public FloorImpl(edu.cmu.mse17654.Casino.PlayerDB db,
                 edu.cmu.mse17654.Casino.Bank bank,
                 edu.cmu.mse17654.Casino.Tables tables)
The constructor for the Floor class.

Parameters:
db - An instance of the Player database class.
bank - The bank object used to buy and sell chips..
tables - The tables object used to join a game..
Method Detail

register

public int register(java.lang.String playerName)
             throws edu.cmu.mse17654.Casino.InvalidPlayerName,
                    edu.cmu.mse17654.Casino.InvalidPlayerID
The new or returning player registers with the system to start

Parameters:
playerName - The client's Player interface.
Returns:
long The player's ID number
Throws:
edu.cmu.mse17654.Casino.InvalidPlayerName
edu.cmu.mse17654.Casino.InvalidPlayerID

getBank

public edu.cmu.mse17654.Casino.Bank getBank(int playerID)
                                     throws edu.cmu.mse17654.Casino.InvalidPlayerID
The player requests the Bank interface.

Parameters:
playerID - The player's ID number gotten at registration.
Returns:
Bank The Banking interface.
Throws:
edu.cmu.mse17654.Casino.InvalidPlayerID

getTables

public edu.cmu.mse17654.Casino.Tables getTables(int playerID)
                                         throws edu.cmu.mse17654.Casino.InvalidPlayerID
The player requests the Tables interface.

Parameters:
playerID - The player's ID number gotten at registration.
Returns:
Bank The Tables interface.
Throws:
edu.cmu.mse17654.Casino.InvalidPlayerID

unregister

public void unregister(int playerID)
                throws edu.cmu.mse17654.Casino.InvalidPlayerID
The player asks to leave the game.

Parameters:
playerID - The client's Player interface.
Returns:
void
Throws:
edu.cmu.mse17654.Casino.InvalidPlayerID