-footer

garrettsmith.blackjack
Class Rules

java.lang.Object
  extended by garrettsmith.blackjack.Rules

public class Rules
extends java.lang.Object

Represents the rules that dictate how the game is played.

Since:
Blackjack v1.0
Version:
Blackjack v1.0
Author:
Garrett Smith, gsmith at northwestern dot edu

Constructor Summary
Rules()
          Creates an object with the default rules.
Rules(java.util.Properties properties)
          Creates an object with the rules specified by the properties passed in.
 
Method Summary
 boolean canDoubleAfterSplit()
          Returns whether the player can double down after splitting.
 boolean canSurrenderEarly()
          Returns whether the player can surrender early.
 boolean canSurrenderLate()
          Returns whether the player can surrender late.
 boolean doesDealerStandOnSoft17()
          Returns whether the dealer stands on a soft 17.
 double getBlackjackPayoff()
          Returns the multiple of the original wager that is paid when the player has blackjack.
 int getMaxSplits()
          Returns the maximum number of splits allowed in one hand.
 int getNumberOfDecks()
          Returns the number of decks used in the shoe for this game.
 double getShuffleLimit()
          Returns the percent use, as a double between 0 and 1, at which the shoe is reshuffled.
 boolean isDoubleDownRestricted()
          Returns whether double down is only allowed on 9s, 10s, and 11s.
 boolean isResplittingAcesAllowed()
          Returns whether splitting already-split aces is allowed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rules

public Rules()
Creates an object with the default rules.


Rules

public Rules(java.util.Properties properties)
Creates an object with the rules specified by the properties passed in.

Method Detail

doesDealerStandOnSoft17

public boolean doesDealerStandOnSoft17()
Returns whether the dealer stands on a soft 17.


getBlackjackPayoff

public double getBlackjackPayoff()
Returns the multiple of the original wager that is paid when the player has blackjack.


canDoubleAfterSplit

public boolean canDoubleAfterSplit()
Returns whether the player can double down after splitting.


canSurrenderEarly

public boolean canSurrenderEarly()
Returns whether the player can surrender early.


canSurrenderLate

public boolean canSurrenderLate()
Returns whether the player can surrender late.


getMaxSplits

public int getMaxSplits()
Returns the maximum number of splits allowed in one hand.


getNumberOfDecks

public int getNumberOfDecks()
Returns the number of decks used in the shoe for this game.


isResplittingAcesAllowed

public boolean isResplittingAcesAllowed()
Returns whether splitting already-split aces is allowed.


isDoubleDownRestricted

public boolean isDoubleDownRestricted()
Returns whether double down is only allowed on 9s, 10s, and 11s.


getShuffleLimit

public double getShuffleLimit()
Returns the percent use, as a double between 0 and 1, at which the shoe is reshuffled.


-footer

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