edu.cmu.mse17654.Casino
Class PlayerClient

java.lang.Object
  |
  +--edu.cmu.mse17654.Casino.PlayerClient

public class PlayerClient
extends java.lang.Object

The "client" part of the Blackjack player client.


Constructor Summary
PlayerClient(java.lang.String[] args, java.util.Properties props, edu.cmu.mse17654.Casino.PlayerSignals playerSignals)
          This constructor method is to create a player.
 
Method Summary
 boolean buyChips()
          This method is to allow player to buy the chips from the bank.
 int GetNumberOfChips()
          This method returnsa the number of purchased chipcs .
 boolean joinTable(edu.cmu.mse17654.Casino.Player playerRef)
          This method is to allow player to join the table.
 boolean leaveTable()
          This method is called when the player wants to leave the table.
 boolean registerPlayer()
          This method is to register the player with the floor.
 boolean sellChips()
          This method is to allow a player to sell the chips to the bank.
 boolean unregisterPlayer()
          This method is to unregister the player from the floor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayerClient

public PlayerClient(java.lang.String[] args,
                    java.util.Properties props,
                    edu.cmu.mse17654.Casino.PlayerSignals playerSignals)
This constructor method is to create a player.

Method Detail

registerPlayer

public boolean registerPlayer()
This method is to register the player with the floor.

Returns:
True if the player cannot register. False, otherwise.
See Also:
PlayerName length is checked (1 - 100)

unregisterPlayer

public boolean unregisterPlayer()
This method is to unregister the player from the floor. It is called when the player wants to leave the casino.

Returns:
True if player fails to unregister. False, otherwise.

buyChips

public boolean buyChips()
This method is to allow player to buy the chips from the bank.

Returns:
True if the player fails to buy the chips. False, otherwise.
See Also:
number of chips to buy is checked (10 - 50000)

sellChips

public boolean sellChips()
This method is to allow a player to sell the chips to the bank.

Returns:
True if the player fails to sell the chips. False, otherwise.

joinTable

public boolean joinTable(edu.cmu.mse17654.Casino.Player playerRef)
This method is to allow player to join the table. Upon successfully joining the table, the table will be assigned to the player.

Returns:
True if player fails to join the table. False, otherwise.

leaveTable

public boolean leaveTable()
This method is called when the player wants to leave the table.

Returns:
True if the player fails to leave the table. False, otherwise.

GetNumberOfChips

public int GetNumberOfChips()
This method returnsa the number of purchased chipcs .

Returns:
The integer value of chips purchased