|
-footer | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgarrettsmith.blackjack.refimpl.TextPlayer
public class TextPlayer
Provides for playing Blackjack via the console. Use argument --help for command line parameter use.
| Method Summary | |
|---|---|
void |
fatalErrorOccurred(java.lang.Exception e)
This method is invoked when an error occurs that prevents the game from completing. |
void |
handFinished(Hand hand,
double gainOrLoss,
Result result,
CardList dealerCards)
Method that is invoked when a hand is done being played. |
static void |
main(java.lang.String[] arguments)
Plays blackjack via the console. |
boolean |
offerEarlySurrender(Hand hand)
Invoked when early surrender is offered; this method then prompts the user. |
boolean |
offerInsurance(Hand hand)
Invoked when insurance if available; always returns false. |
Move |
offerRegularTurn(Hand hand)
Method invoked when the player is offered a turn. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void main(java.lang.String[] arguments)
Plays blackjack via the console. Use argument --help for command line parameter usage.
public boolean offerInsurance(Hand hand)
public boolean offerEarlySurrender(Hand hand)
offerEarlySurrender in interface EventHandlerhand - the hand for which early surrender is being offered
true if the user wishes to surrender;
false otherwisepublic Move offerRegularTurn(Hand hand)
EventHandlerMove they wish to make.
offerRegularTurn in interface EventHandlerhand - the hand for which a turn is being offered
Move the player whishes to makepublic void fatalErrorOccurred(java.lang.Exception e)
EventHandler
fatalErrorOccurred in interface EventHandlere - the exception that caused the error
public void handFinished(Hand hand,
double gainOrLoss,
Result result,
CardList dealerCards)
EventHandler
handFinished in interface EventHandlerhand - the hand which has completed the gamegainOrLoss - the winnings from the hand; negative if the wager was lostresult - the result of the hand; see ResultdealerCards - the cards that the dealer ended the hand with
|
-footer | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||