Blackjack

com.amoebacode.blackjack.strategy
Class BasicStrategyFactory

java.lang.Object
  |
  +--com.amoebacode.blackjack.strategy.BasicStrategyFactory

abstract class BasicStrategyFactory
extends java.lang.Object

BasicStrategyFactory calculates the proper strategy tables, depending on the current house rules.

Version:
0.9
Author:
Jason Gurney

Field Summary
private static CorrectAction dbl
          The correct action corresponding to a double down (hit if unavailable)
private static CorrectAction dbs
          The correct action corresponding to a double down (stand if unavailable)
private static CorrectAction hit
          The correct action corresponding to a hit
private static CorrectAction spl
          The correct action corresponding to a split
private static CorrectAction std
          The correct action corresponding to a stand
private static CorrectAction sur
          The correct action corresponding to a surrender (hit if unavailable)
private static CorrectAction sus
          The correct action corresponding to a surrender (stand if unavailable)
 
Constructor Summary
(package private) BasicStrategyFactory()
           
 
Method Summary
protected static HardStrategy getHardStrategy(IHouseRules houseRules)
          Returns the matrix of correct strategy decisions for hard hands, given the specified casino options.
protected static StrategyTableRow[] getHardStrategyRows(IHouseRules houseRules)
          Returns an array of correct strategy rows for hard hands, given the specified casino options.
protected static PairStrategy getPairStrategy(IHouseRules houseRules)
          Returns the matrix of correct strategy decisions for pair hands, given the specified casino options.
protected static StrategyTableRow[] getPairStrategyRows(IHouseRules houseRules)
          Returns an array of correct strategy rows for pair hands, given the specified casino options.
protected static SoftStrategy getSoftStrategy(IHouseRules houseRules)
          Returns the matrix of correct strategy decisions for soft hands, given the specified casino options.
protected static StrategyTableRow[] getSoftStrategyRows(IHouseRules houseRules)
          Returns an array of correct strategy rows for soft hands, given the specified casino options.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

hit

private static final CorrectAction hit
The correct action corresponding to a hit

std

private static final CorrectAction std
The correct action corresponding to a stand

dbl

private static final CorrectAction dbl
The correct action corresponding to a double down (hit if unavailable)

spl

private static final CorrectAction spl
The correct action corresponding to a split

dbs

private static final CorrectAction dbs
The correct action corresponding to a double down (stand if unavailable)

sur

private static final CorrectAction sur
The correct action corresponding to a surrender (hit if unavailable)

sus

private static final CorrectAction sus
The correct action corresponding to a surrender (stand if unavailable)
Constructor Detail

BasicStrategyFactory

BasicStrategyFactory()
Method Detail

getPairStrategyRows

protected static StrategyTableRow[] getPairStrategyRows(IHouseRules houseRules)
Returns an array of correct strategy rows for pair hands, given the specified casino options.
Parameters:
houseRules - the casino options
Returns:
the array of correct strategy rows for pair hands

getPairStrategy

protected static PairStrategy getPairStrategy(IHouseRules houseRules)
Returns the matrix of correct strategy decisions for pair hands, given the specified casino options.
Parameters:
houseRules - the casino options
Returns:
the matrix of correct strategy decisions for pair hands

getHardStrategyRows

protected static StrategyTableRow[] getHardStrategyRows(IHouseRules houseRules)
Returns an array of correct strategy rows for hard hands, given the specified casino options.
Parameters:
houseRules - the casino options
Returns:
the array of correct strategy rows for hard hands

getHardStrategy

protected static HardStrategy getHardStrategy(IHouseRules houseRules)
Returns the matrix of correct strategy decisions for hard hands, given the specified casino options.
Parameters:
houseRules - the casino options
Returns:
the matrix of correct strategy decisions for hard hands

getSoftStrategyRows

protected static StrategyTableRow[] getSoftStrategyRows(IHouseRules houseRules)
Returns an array of correct strategy rows for soft hands, given the specified casino options.
Parameters:
houseRules - the casino options
Returns:
the array of correct strategy rows for soft hands

getSoftStrategy

protected static SoftStrategy getSoftStrategy(IHouseRules houseRules)
Returns the matrix of correct strategy decisions for soft hands, given the specified casino options.
Parameters:
houseRules - the casino options
Returns:
the matrix of correct strategy decisions for soft hands

Blackjack

Copyright © 2002 amoebacode.com.