lthc.casino
Class Player

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended bylthc.casino.UserImpl
                  extended bylthc.casino.Player
All Implemented Interfaces:
java.rmi.Remote, java.io.Serializable, User

public class Player
extends UserImpl

This class is an extension of User

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
Player()
          this is the main constructor
Player(java.lang.String name, java.lang.String pass, int rank, int money, Casino casino)
          Player constructor
 
Method Summary
 Card addCard(Card c)
          Adds the card to the players card list
 int getBet()
          Gets the bet
 java.util.ArrayList getCards()
          Gets the ArrayList of cards
 void resetCards()
          Resets the list of cards done when game is over
 void setBet(int bet)
          Sets the bet
 
Methods inherited from class lthc.casino.UserImpl
getMoney, getName, getPassword, getRank, getRankNumber, setMoney, setRank
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Player

public Player()
       throws java.rmi.RemoteException
this is the main constructor


Player

public Player(java.lang.String name,
              java.lang.String pass,
              int rank,
              int money,
              Casino casino)
       throws java.rmi.RemoteException
Player constructor

Parameters:
name - String containing name
pass - String containing pass
rank - Int of rank
casino - The casino object
Throws:
java.rmi.RemoteException
Method Detail

setBet

public void setBet(int bet)
            throws java.rmi.RemoteException
Sets the bet

Parameters:
bet - The amount to set the bet to
Throws:
java.rmi.RemoteException

getBet

public int getBet()
           throws java.rmi.RemoteException
Gets the bet

Returns:
Returns the bet
Throws:
java.rmi.RemoteException

addCard

public Card addCard(Card c)
Adds the card to the players card list

Parameters:
c - the card to add
Returns:
The card added

resetCards

public void resetCards()
Resets the list of cards done when game is over


getCards

public java.util.ArrayList getCards()
Gets the ArrayList of cards

Returns:
The ArrayList of cards