Package garrettsmith.blackjack

Provides classes for playing a game of blackjack.


Interface Summary
EventHandler Provides a callback interface for playing blackjack.
Move Represents a player's move, such as hitting or standing.
Result Represents the result of one hand that is complete.

Class Summary
Blackjack Provides for playing a game of blackjack.
Hand Represents a player's hand of cards.
Rules Represents the rules that dictate how the game is played.

Exception Summary
NotAllowedException Thrown when a move is chosen that is now allowed.

Package garrettsmith.blackjack Description

Provides classes for playing a game of blackjack.

Implement EventHandler to respond to events that a fired by Blackjack. Then, pass in an instance of that handler to Blackjack.playGame(garrettsmith.blackjack.EventHandler, double).

For example:

        double wager = 2.0;
        Blackjack blackjack = new Blackjack();
        EventHandler handler = new MyEventHandler();
        blackjack.playGame( handler, wager );

See TextPlayer for an example implementation.


Copyright 2001-5 Garrett Smith. Use is subject to license terms.