Blackjack

com.amoebacode.blackjack.strategy
Class BasicStrategy

java.lang.Object
  |
  +--com.amoebacode.blackjack.strategy.BasicStrategy
All Implemented Interfaces:
IBasicStrategy

public class BasicStrategy
extends java.lang.Object
implements IBasicStrategy

BasicStrategy manages the basic strategy tutor, which indicates whether the user is making the proper playing decisions.

Version:
0.9
Author:
Jason Gurney

Field Summary
private  BasicStrategyEventListenerCollection basicStrategyListeners
          The collection of event listeners for this basic strategy tutor
private  HardStrategy hardStrategy
          The matrix of correct strategy decisions for hard hands
private  PairStrategy pairStrategy
          The matrix of correct strategy decisions for pair hands
private  SoftStrategy softStrategy
          The matrix of correct strategy decisions for soft hands
 
Constructor Summary
BasicStrategy(IHouseRules houseRules)
          Default public constructor.
 
Method Summary
 void addBasicStrategyListener(BasicStrategyEventListener gel)
          Adds the specified event listener to this object's event listener collection.
 void checkAction(IPlayerHand playerHand, java.lang.String action, int dealerScore)
          Checks whether the player is making the proper basic strategy playing decision.
 void setStrategy(IHouseRules houseRules)
          Sets the correct strategy decision matrices for the current casino options.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

pairStrategy

private PairStrategy pairStrategy
The matrix of correct strategy decisions for pair hands

hardStrategy

private HardStrategy hardStrategy
The matrix of correct strategy decisions for hard hands

softStrategy

private SoftStrategy softStrategy
The matrix of correct strategy decisions for soft hands

basicStrategyListeners

private BasicStrategyEventListenerCollection basicStrategyListeners
The collection of event listeners for this basic strategy tutor
Constructor Detail

BasicStrategy

public BasicStrategy(IHouseRules houseRules)
Default public constructor.
Parameters:
game - main Game object
Method Detail

setStrategy

public void setStrategy(IHouseRules houseRules)
Description copied from interface: IBasicStrategy
Sets the correct strategy decision matrices for the current casino options.
Specified by:
setStrategy in interface IBasicStrategy
See Also:
IBasicStrategy.setStrategy(IHouseRules)

checkAction

public void checkAction(IPlayerHand playerHand,
                        java.lang.String action,
                        int dealerScore)
Description copied from interface: IBasicStrategy
Checks whether the player is making the proper basic strategy playing decision.
Specified by:
checkAction in interface IBasicStrategy
See Also:
IBasicStrategy.checkAction(IPlayerHand, String, int)

addBasicStrategyListener

public void addBasicStrategyListener(BasicStrategyEventListener gel)
Description copied from interface: IBasicStrategy
Adds the specified event listener to this object's event listener collection.
Specified by:
addBasicStrategyListener in interface IBasicStrategy
See Also:
IBasicStrategy.addBasicStrategyListener(BasicStrategyEventListener)

Blackjack

Copyright © 2002 amoebacode.com.