Blackjack

com.amoebacode.blackjack.core
Interface IHouseRules

All Known Implementing Classes:
HouseRules

public interface IHouseRules

IHouseRules defines the public API for displaying and updating user-configurable casino options.

Version:
0.9
Author:
Jason Gurney

Field Summary
static java.lang.String ANY_TWO_CARDS
          The option of doubling any two cards
static java.lang.String EARLY_SURRENDER
          The option of early surrender availability
static java.lang.String LATE_SURRENDER
          The option of late surrender availability
static java.lang.String NINE_TEN_ELEVEN
          The option of doubling two cards that score 9, 10 or 11
static java.lang.String NO_SURRENDER
          The option of no surrender availability
static java.lang.String TEN_ELEVEN
          The option of doubling two cards that score 10 or 11
 
Method Summary
 boolean canDoubleAfterSplit()
          Indicates whether the player can double down after splitting.
 boolean canDoubleAnyTwoCards()
          Indicates whether the user can double any two cards.
 boolean canDoubleNineTenElevenOnly()
          Indicates whether the user can double a nine, ten, or eleven only.
 boolean canDoubleTenElevenOnly()
          Indicates whether the user can double a ten or eleven only.
 boolean dealerHitsSoftSeventeen()
          Indicates whether the dealer hits a soft seventeen.
 boolean earlySurrenderAvailable()
          Indicates whether early surrender is available.
 int getMaxHardDealerHit()
          Returns the highest hard score that a dealer would hit.
 int getMaxSoftDealerHit()
          Returns the highest soft score that a dealer would hit.
 int getNumberOfDecks()
          Returns the number of decks in the dealer's shoe.
 boolean lateSurrenderOnlyAvailable()
          Indicates whether late surrender is available.
 boolean noSurrenderAvailable()
          Indicates whether no surrender is available.
 void setCanDouble(java.lang.String value)
          Sets the double down availability option.
 void setCanDoubleAfterSplit(boolean value)
          Sets the double after split option.
 void setCanSurrender(java.lang.String value)
          Sets the surrender availability option.
 void setDealerHitsSoftSeventeen(boolean value)
          Sets the soft seventeen dealer option.
 void setEarlySurrenderAvailable()
          Sets the surrender availability to early.
 void setNumberOfDecks(int numberOfDecks)
          Sets the number of decks in the dealer's shoe.
 

Field Detail

ANY_TWO_CARDS

public static final java.lang.String ANY_TWO_CARDS
The option of doubling any two cards

TEN_ELEVEN

public static final java.lang.String TEN_ELEVEN
The option of doubling two cards that score 10 or 11

NINE_TEN_ELEVEN

public static final java.lang.String NINE_TEN_ELEVEN
The option of doubling two cards that score 9, 10 or 11

NO_SURRENDER

public static final java.lang.String NO_SURRENDER
The option of no surrender availability

EARLY_SURRENDER

public static final java.lang.String EARLY_SURRENDER
The option of early surrender availability

LATE_SURRENDER

public static final java.lang.String LATE_SURRENDER
The option of late surrender availability
Method Detail

getNumberOfDecks

public int getNumberOfDecks()
Returns the number of decks in the dealer's shoe.
Returns:
int the number of decks

canDoubleAfterSplit

public boolean canDoubleAfterSplit()
Indicates whether the player can double down after splitting.
Returns:
true if the player can double after split

earlySurrenderAvailable

public boolean earlySurrenderAvailable()
Indicates whether early surrender is available.
Returns:
true if early surrender is available

dealerHitsSoftSeventeen

public boolean dealerHitsSoftSeventeen()
Indicates whether the dealer hits a soft seventeen.
Returns:
true if the dealer hits a soft seventeen

setDealerHitsSoftSeventeen

public void setDealerHitsSoftSeventeen(boolean value)
Sets the soft seventeen dealer option.
Parameters:
dealerHitsSoftSeventeen - the new soft seventeen dealer policy

setCanDoubleAfterSplit

public void setCanDoubleAfterSplit(boolean value)
Sets the double after split option.
Parameters:
canDoubleAfterSplit - the new double after split policy

setNumberOfDecks

public void setNumberOfDecks(int numberOfDecks)
Sets the number of decks in the dealer's shoe.
Parameters:
numberOfDecks - the new number of decks

setEarlySurrenderAvailable

public void setEarlySurrenderAvailable()
Sets the surrender availability to early.

setCanDouble

public void setCanDouble(java.lang.String value)
Sets the double down availability option.
Parameters:
canDouble - the new double down availability

canDoubleAnyTwoCards

public boolean canDoubleAnyTwoCards()
Indicates whether the user can double any two cards.
Returns:
true if the user can double any two cards

canDoubleNineTenElevenOnly

public boolean canDoubleNineTenElevenOnly()
Indicates whether the user can double a nine, ten, or eleven only.
Returns:
true if the user can double 9, 10, or 11 only

canDoubleTenElevenOnly

public boolean canDoubleTenElevenOnly()
Indicates whether the user can double a ten or eleven only.
Returns:
true if the user can double 10, or 11 only

lateSurrenderOnlyAvailable

public boolean lateSurrenderOnlyAvailable()
Indicates whether late surrender is available.
Returns:
true if late surrender is available

noSurrenderAvailable

public boolean noSurrenderAvailable()
Indicates whether no surrender is available.
Returns:
true if no surrender is available

setCanSurrender

public void setCanSurrender(java.lang.String value)
Sets the surrender availability option.
Parameters:
canSurrender - the new surrender availability

getMaxHardDealerHit

public int getMaxHardDealerHit()
Returns the highest hard score that a dealer would hit.
Returns:
int the maximum dealer hard hit score

getMaxSoftDealerHit

public int getMaxSoftDealerHit()
Returns the highest soft score that a dealer would hit.
Returns:
int the maximum dealer soft hit score

Blackjack

Copyright © 2002 amoebacode.com.