|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectblackjackanalyst.Player
public class Player
A player at a blackjack table.
| Constructor Summary | |
|---|---|
Player(PlayerStrategy _bj_strategy)
Creates an unnamed blackjack player with the given strategy and the default bankroll of 500. |
|
Player(PlayerStrategy _bj_strategy,
int _bankroll)
Creates an unnamed blackjack player with the given strategy and bankroll. |
|
Player(PlayerStrategy _bj_strategy,
int _bankroll,
java.lang.String player_name)
Creates a named blackjack player with the given strategy and bankroll. |
|
Player(PlayerStrategy _bj_strategy,
java.lang.String player_name)
Creates a named blackjack player with the given strategy and the default bankroll of 500. |
|
| Method Summary | |
|---|---|
int |
getBankroll()
Returns the bankroll of the player. |
java.lang.String |
getName()
Returns the name of the player. |
ObserverList<PlayerObserver> |
getObservers()
Returns the list of observers, to which observers for this player can be added, removed, and so forth. |
PlayerStrategy |
getStrategy()
Returns the strategy used by the player. |
Table |
getTable()
Returns the table this player is playing blackjack at. |
int |
setBankroll(int new_bankroll)
Sets the bankroll of the player to new_bankroll. |
PlayerStrategy |
setStrategy(PlayerStrategy new_strategy)
Sets the strategy of the player to new_strategy. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Player(PlayerStrategy _bj_strategy)
_bj_strategy - the strategy the blackjack player will use
public Player(PlayerStrategy _bj_strategy,
java.lang.String player_name)
_bj_strategy - the strategy the blackjack player will useplayer_name - the name of the player
public Player(PlayerStrategy _bj_strategy,
int _bankroll)
_bj_strategy - the strategy the blackjack player will use_bankroll - the starting bankroll of the player
public Player(PlayerStrategy _bj_strategy,
int _bankroll,
java.lang.String player_name)
_bj_strategy - the strategy the blackjack player will use_bankroll - the starting bankroll of the playerplayer_name - the name of the player| Method Detail |
|---|
public Table getTable()
null.
public PlayerStrategy setStrategy(PlayerStrategy new_strategy)
new_strategy. The
previous strategy of the player is returned.
new_strategy - the new player strategy
public PlayerStrategy getStrategy()
public int setBankroll(int new_bankroll)
new_bankroll. The
previous bankroll is returned.
new_bankroll - the new player bankroll
public int getBankroll()
public java.lang.String getName()
public java.lang.String toString()
toString in class java.lang.Objectpublic ObserverList<PlayerObserver> getObservers()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||