-footer
A B C D E F G H I J K L M N O P Q R S T V W

A

ACE - Static variable in class garrettsmith.playingcards.Card.Value
Represents a ace.
add(Object) - Method in class garrettsmith.playingcards.CardList
Adds a card to the list.

B

BLACK - Static variable in class garrettsmith.playingcards.Card.Color
Indicates a black card.
Blackjack - Class in garrettsmith.blackjack
Provides for playing a game of blackjack.
Blackjack() - Constructor for class garrettsmith.blackjack.Blackjack
Creates a new Blackjack game simulator with the default Rules.
Blackjack(Rules) - Constructor for class garrettsmith.blackjack.Blackjack
Creates a new Blackjack simulator with the specified Rules.
BLACKJACK - Static variable in interface garrettsmith.blackjack.Result
Represents when the player has a blackjack.
BLACKJACK_PUSH - Static variable in interface garrettsmith.blackjack.Result
Represents when both the player and the dealer have a blackjack.
BUSTED - Static variable in interface garrettsmith.blackjack.Result
Represents when the player's hand exceeded 21.

C

calculateBestValue(CardList) - Static method in class garrettsmith.blackjack.Blackjack
Calculates the highest possible value for a list of cards without busting, if possible.
calculateValue(Card) - Static method in class garrettsmith.blackjack.Blackjack
Calculates the value of a playing card according to the rules of Blackjack; assumes all aces are worth 1.
calculateValue(CardList) - Static method in class garrettsmith.blackjack.Blackjack
Calculates the value of a list of cards according to the rules of Blackjack; assumes all aces are worth 1.
canDoubleAfterSplit() - Method in class garrettsmith.blackjack.Rules
Returns whether the player can double down after splitting.
canSurrenderEarly() - Method in class garrettsmith.blackjack.Rules
Returns whether the player can surrender early.
canSurrenderLate() - Method in class garrettsmith.blackjack.Rules
Returns whether the player can surrender late.
Card - Class in garrettsmith.playingcards
Represents a card in a typical deck of playing cards.
Card() - Constructor for class garrettsmith.playingcards.Card
Creates a joker.
Card(Card.Value, Card.Suit) - Constructor for class garrettsmith.playingcards.Card
Creates a new card with the specified suit and value.
Card.Color - Class in garrettsmith.playingcards
Represents the card's color: red, black, or none.
Card.Suit - Class in garrettsmith.playingcards
Represents a card's suit, such as spades or clubs.
Card.Value - Class in garrettsmith.playingcards
Represents a card's value: two, queen, or ace, for example.
CardContainer - Class in garrettsmith.playingcards
Represents a collection of cards, typically comprised of one or more decks.
CardContainer(Deck) - Constructor for class garrettsmith.playingcards.CardContainer
Creates a shuffled container with its cards set to those of one deck.
CardContainer(Deck, int) - Constructor for class garrettsmith.playingcards.CardContainer
Creates a shuffled container with cards from numDecks number of decks.
CardContainer(Deck, int, boolean) - Constructor for class garrettsmith.playingcards.CardContainer
Creates a container with cards from numDecks number of decks; will be shuffled according to the value of shuffle.
CardContainer(CardList) - Constructor for class garrettsmith.playingcards.CardContainer
Creates an unshuffled container with its cards equal to the contents of cards.
CardList - Class in garrettsmith.playingcards
Provides a List with some protection to ensure only Card objects are put into the list.
CardList() - Constructor for class garrettsmith.playingcards.CardList
Creates an empty card list with an initial capaciy of 10.
CardList(int) - Constructor for class garrettsmith.playingcards.CardList
Creates an empty card list with an initial capaciy of capacity.
CardList(CardList) - Constructor for class garrettsmith.playingcards.CardList
Creates a card list which contains the contents of cards.
clone() - Method in class garrettsmith.playingcards.Card.Suit
 
CLUB - Static variable in class garrettsmith.playingcards.Card.Suit
Represents the clubs.

D

DEALER_BLACKJACK - Static variable in interface garrettsmith.blackjack.Result
Represents when the dealer has a blackjack.
DEALER_BUSTED - Static variable in interface garrettsmith.blackjack.Result
Represents when the dealer's hand exceeded 21 and the player's hand is equal to or less than 21.
Deck - Interface in garrettsmith.playingcards
Abstractly represents a deck of playing cards with a type distribution.
DECK - Static variable in class garrettsmith.playingcards.StandardDeck
Singleton instance of this immutable deck.
DIAMOND - Static variable in class garrettsmith.playingcards.Card.Suit
Represents the diamonds.
doesDealerStandOnSoft17() - Method in class garrettsmith.blackjack.Rules
Returns whether the dealer stands on a soft 17.
DOUBLE - Static variable in interface garrettsmith.blackjack.Move
Single instance of the move that represents doubling down.

E

EARLY_SURRENDER - Static variable in interface garrettsmith.blackjack.Result
Represents when the player surrenders his hand.
EIGHT - Static variable in class garrettsmith.playingcards.Card.Value
Represents a eight.
equals(Object) - Method in class garrettsmith.playingcards.Card.Color
Returns whether object is a Color equal to this one.
equals(Object) - Method in class garrettsmith.playingcards.Card
Returns whether the object referred to in the object parameter is equal to this instance.
equals(Object) - Method in class garrettsmith.playingcards.Card.Suit
Returns whether object is equal to this suit.
equals(Object) - Method in class garrettsmith.playingcards.Card.Value
Returns whether object is equal to this Value.
EventHandler - Interface in garrettsmith.blackjack
Provides a callback interface for playing blackjack.
execute(Hand, EventHandler, CardList) - Method in interface garrettsmith.blackjack.Move
Executes the move; should only be invoked internally by the framework.

F

fatalErrorOccurred(Exception) - Method in interface garrettsmith.blackjack.EventHandler
This method is invoked when an error occurs that prevents the game from completing.
fatalErrorOccurred(Exception) - Method in class garrettsmith.blackjack.refimpl.TextPlayer
 
FIVE - Static variable in class garrettsmith.playingcards.Card.Value
Represents a five.
FOUR - Static variable in class garrettsmith.playingcards.Card.Value
Represents a four.

G

garrettsmith.blackjack - package garrettsmith.blackjack
Provides classes for playing a game of blackjack.
garrettsmith.blackjack.refimpl - package garrettsmith.blackjack.refimpl
Provides for using the blackjack framework via the console and serves as an example implementation of EventHandler.
garrettsmith.playingcards - package garrettsmith.playingcards
Provides basic classes for simulating a game that uses playing cards.
getAllCards() - Method in interface garrettsmith.playingcards.Deck
Returns a nonrandom list of all cards contained in a fresh deck.
getAllCards() - Method in class garrettsmith.playingcards.StandardDeck
Returns a nonrandom list of all 52 cards contained in a fresh deck.
getBestValue() - Method in class garrettsmith.blackjack.Hand
Returns the highest hand value without busting, if possible.
getBlackjackPayoff() - Method in class garrettsmith.blackjack.Rules
Returns the multiple of the original wager that is paid when the player has blackjack.
getCard() - Method in class garrettsmith.playingcards.CardContainer
Removes and returns a single card from the container.
getCard(int) - Method in class garrettsmith.playingcards.CardList
Returns a Card from the specified index.
getCards() - Method in class garrettsmith.blackjack.Hand
Returns the player's cards that represent this hand.
getColor() - Method in class garrettsmith.playingcards.Card
Returns a string representation of this card's color.
getDealerCard() - Method in class garrettsmith.blackjack.Hand
Returns the card that the dealer displays to the players.
getDealerValue() - Method in class garrettsmith.blackjack.Hand
Calculates the value of the dealer's card assuming an ace is worth 1.
getMaxSplits() - Method in class garrettsmith.blackjack.Rules
Returns the maximum number of splits allowed in one hand.
getNumberOfDecks() - Method in class garrettsmith.blackjack.Rules
Returns the number of decks used in the shoe for this game.
getNumCardsOfType(Card.Color) - Method in interface garrettsmith.playingcards.Deck
Returns the number of cards in the deck whose color is equal to color.
getNumCardsOfType(Card.Suit) - Method in interface garrettsmith.playingcards.Deck
Returns the number of cards in the deck whose suit is equal to suite.
getNumCardsOfType(Card.Value) - Method in interface garrettsmith.playingcards.Deck
Returns the number of cards in the deck whose value is equal to value.
getNumCardsOfType(Card.Color) - Method in class garrettsmith.playingcards.StandardDeck
Returns the number of cards in the deck whose color is equal to color.
getNumCardsOfType(Card.Suit) - Method in class garrettsmith.playingcards.StandardDeck
Returns the number of cards in the deck whose suit is equal to suite.
getNumCardsOfType(Card.Value) - Method in class garrettsmith.playingcards.StandardDeck
Returns the number of cards in the deck whose value is equal to value.
getRules() - Method in class garrettsmith.blackjack.Blackjack
Returns the current Rules being used.
getShuffleLimit() - Method in class garrettsmith.blackjack.Rules
Returns the percent use, as a double between 0 and 1, at which the shoe is reshuffled.
getSuit() - Method in class garrettsmith.playingcards.Card
Returns the card's suit.
getValue() - Method in class garrettsmith.blackjack.Hand
Returns the value of the hand assuming all aces are worth 1.
getValue() - Method in class garrettsmith.playingcards.Card
Returns the card's value.
getWager() - Method in class garrettsmith.blackjack.Hand
Returns the amount that was bet on this hand.

H

Hand - Class in garrettsmith.blackjack
Represents a player's hand of cards.
handFinished(Hand, double, Result, CardList) - Method in interface garrettsmith.blackjack.EventHandler
Method that is invoked when a hand is done being played.
handFinished(Hand, double, Result, CardList) - Method in class garrettsmith.blackjack.refimpl.TextPlayer
 
hashCode() - Method in class garrettsmith.playingcards.Card.Color
Returns a hash value for this card.
hashCode() - Method in class garrettsmith.playingcards.Card
Returns a hash value for this card.
hashCode() - Method in class garrettsmith.playingcards.Card.Suit
Returns a hash value for this card.
hashCode() - Method in class garrettsmith.playingcards.Card.Value
Returns a hash value for this card.
hasMoreCards() - Method in class garrettsmith.playingcards.CardContainer
Returns whether this container has any cards left in it.
HEART - Static variable in class garrettsmith.playingcards.Card.Suit
Represents the hearts.
HIT - Static variable in interface garrettsmith.blackjack.Move
Single instance of the move that represents hitting.

I

isAutoResetOn() - Method in class garrettsmith.playingcards.CardContainer
Returns whether or not auto reset is on.
isBlackjack(CardList) - Static method in class garrettsmith.blackjack.Blackjack
Returns whether the list of cards passed in represents a blackjack.
isBusted() - Method in class garrettsmith.blackjack.Hand
Returns whether this hand has gone over 21.
isDoubleDownAllowed() - Method in class garrettsmith.blackjack.Hand
Returns whether a double down is allowed at this point in the game.
isDoubleDownRestricted() - Method in class garrettsmith.blackjack.Rules
Returns whether double down is only allowed on 9s, 10s, and 11s.
isEmpty() - Method in class garrettsmith.playingcards.CardContainer
Returns whether this container is empty.
isHitAllowed() - Method in class garrettsmith.blackjack.Hand
Returns whether a hit is allowed at this point in the hand.
isMoveAllowed(Move) - Method in class garrettsmith.blackjack.Hand
Returns whether move is allowed at this point in the game.
isNonAceFaceCard(Card) - Static method in class garrettsmith.blackjack.Blackjack
Returns whether the card passed in is a non-Ace face card: a ten, jack, queen, or king.
isResplittingAcesAllowed() - Method in class garrettsmith.blackjack.Rules
Returns whether splitting already-split aces is allowed.
isSoft(CardList) - Static method in class garrettsmith.blackjack.Blackjack
Returns whether the list of cards is a soft hand.
isSoft() - Method in class garrettsmith.blackjack.Hand
Tells whether the hand is soft.
isSplitAllowed() - Method in class garrettsmith.blackjack.Hand
Returns whether a split is allowed at this point in the hand.
isStandAllowed() - Method in class garrettsmith.blackjack.Hand
Returns whether standing is allowed at this point in the game.
isSurrenderAllowed() - Method in class garrettsmith.blackjack.Hand
Returns whether a surrender is allowed.

J

JACK - Static variable in class garrettsmith.playingcards.Card.Value
Represents a jack.
JOKER - Static variable in class garrettsmith.playingcards.Card.Value
Represents a joker.

K

KING - Static variable in class garrettsmith.playingcards.Card.Value
Represents a king.

L

LATE_SURRENDER - Static variable in interface garrettsmith.blackjack.Result
Represents when the player surrenders his hand.
LOSE - Static variable in interface garrettsmith.blackjack.Result
Represents when the player has a hand whose value is less than the dealer's and both hands are equal to or less than 21.

M

main(String[]) - Static method in class garrettsmith.blackjack.refimpl.TextPlayer
Plays blackjack via the console.
Move - Interface in garrettsmith.blackjack
Represents a player's move, such as hitting or standing.

N

NINE - Static variable in class garrettsmith.playingcards.Card.Value
Represents a nine.
NoMoreCardsException - Exception in garrettsmith.playingcards
Thrown when a card is requested from a collection but that collection has no more cards left.
NoMoreCardsException(String) - Constructor for exception garrettsmith.playingcards.NoMoreCardsException
Creates an exception with the specified detail message.
NONE - Static variable in class garrettsmith.playingcards.Card.Color
Indicates a card with no color.
NONE - Static variable in class garrettsmith.playingcards.Card.Suit
Represents no suit.
NotAllowedException - Exception in garrettsmith.blackjack
Thrown when a move is chosen that is now allowed.

O

offerEarlySurrender(Hand) - Method in interface garrettsmith.blackjack.EventHandler
Method that is optionally invoked if the player has the option of early surrender.
offerEarlySurrender(Hand) - Method in class garrettsmith.blackjack.refimpl.TextPlayer
Invoked when early surrender is offered; this method then prompts the user.
offerInsurance(Hand) - Method in class garrettsmith.blackjack.refimpl.TextPlayer
Invoked when insurance if available; always returns false.
offerRegularTurn(Hand) - Method in interface garrettsmith.blackjack.EventHandler
Method invoked when the player is offered a turn.
offerRegularTurn(Hand) - Method in class garrettsmith.blackjack.refimpl.TextPlayer
 
originalSize() - Method in class garrettsmith.playingcards.CardContainer
Returns the original size of this container.

P

playGame(EventHandler, double) - Method in class garrettsmith.blackjack.Blackjack
Plays one game of blackjack betting wager and using handler to determine how the player's hand is played.
PUSH - Static variable in interface garrettsmith.blackjack.Result
Represents when both the player and dealer have the same value hand that is equal to or less than 21.

Q

QUEEN - Static variable in class garrettsmith.playingcards.Card.Value
Represents a queen.

R

RED - Static variable in class garrettsmith.playingcards.Card.Color
Indicates a red card.
removeCard(int) - Method in class garrettsmith.playingcards.CardList
Removes a Card at the specified index.
reset() - Method in class garrettsmith.playingcards.CardContainer
Resets this container with the original number and distribution of cards; does not re-shuffle (randomly re-order) the container and does not return the cards to their original order.
resetShuffle() - Method in class garrettsmith.playingcards.CardContainer
Resets this container with the original number and type distribution of cards and re-shuffles (randomly re-orders) the cards.
Result - Interface in garrettsmith.blackjack
Represents the result of one hand that is complete.
Rules - Class in garrettsmith.blackjack
Represents the rules that dictate how the game is played.
Rules() - Constructor for class garrettsmith.blackjack.Rules
Creates an object with the default rules.
Rules(Properties) - Constructor for class garrettsmith.blackjack.Rules
Creates an object with the rules specified by the properties passed in.

S

setAutoReset(double) - Method in class garrettsmith.playingcards.CardContainer
Turns on auto reset, where the container is automatically reset AND reshuffled (radomly re-ordered) whenever the number of undealt cards falls below percentage percent the original number.
setAutoReset(int) - Method in class garrettsmith.playingcards.CardContainer
Turns on auto reset, where the container is automatically reset AND reshuffled (radomly re-ordered) whenever the number of undealt cards falls below limit.
setAutoResetOff() - Method in class garrettsmith.playingcards.CardContainer
Turns off auto reset.
setRules(Rules) - Method in class garrettsmith.blackjack.Blackjack
Sets the rules used to determine how the game is handled.
SEVEN - Static variable in class garrettsmith.playingcards.Card.Value
Represents a seven.
shuffle() - Method in class garrettsmith.playingcards.CardContainer
Shuffles (randomly orders) the contents of the container.
SIX - Static variable in class garrettsmith.playingcards.Card.Value
Represents a six.
size() - Method in class garrettsmith.playingcards.CardContainer
Returns the number of undealt cards in the container
size() - Method in interface garrettsmith.playingcards.Deck
Returns the total number of cards in the deck.
size() - Method in class garrettsmith.playingcards.StandardDeck
Returns the number of cards in this deck: 52 for this specific deck.
SPADE - Static variable in class garrettsmith.playingcards.Card.Suit
Represents the spades.
SPLIT - Static variable in interface garrettsmith.blackjack.Move
Single instance of the move that represents splitting the hand.
STAND - Static variable in interface garrettsmith.blackjack.Move
Single instance of the move that represents standing.
StandardDeck - Class in garrettsmith.playingcards
Represents a standard deck of 52 playing cards.
SURRENDER - Static variable in interface garrettsmith.blackjack.Move
Single instance of the move that represents surrendering.

T

TEN - Static variable in class garrettsmith.playingcards.Card.Value
Represents a ten.
TextPlayer - Class in garrettsmith.blackjack.refimpl
Provides for playing Blackjack via the console.
THREE - Static variable in class garrettsmith.playingcards.Card.Value
Represents a three.
toString() - Method in class garrettsmith.blackjack.Hand
Returns the state of this hand as a human-readable String.
toString() - Method in class garrettsmith.playingcards.Card.Color
Returns a string representation.
toString() - Method in class garrettsmith.playingcards.Card.Suit
Returns a string representation of this value.
toString() - Method in class garrettsmith.playingcards.Card
Returns a string representation this card's state.
toString() - Method in class garrettsmith.playingcards.Card.Value
Returns a string repesentation.
toString() - Method in class garrettsmith.playingcards.CardContainer
Returns a string representation of this container.
toString() - Method in class garrettsmith.playingcards.StandardDeck
Returns a string representation of this deck.
TWO - Static variable in class garrettsmith.playingcards.Card.Value
Represents a two.

V

value() - Method in interface garrettsmith.blackjack.Move
The numeric value of the move used only internally for equality comparison.
value() - Method in interface garrettsmith.blackjack.Result
Returns the value of the result used only internally for equality comparison.

W

WIN - Static variable in interface garrettsmith.blackjack.Result
Represents when the player has a hand whose value is greater than the dealer's and both hands are equal to or less than 21.

A B C D E F G H I J K L M N O P Q R S T V W
-footer

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