Blackjack

com.amoebacode.blackjack.command
Class CommandFactory

java.lang.Object
  |
  +--com.amoebacode.blackjack.command.CommandFactory

public class CommandFactory
extends java.lang.Object

CommandFactory is used to build the various game and player hand commands.

Version:
0.9
Author:
Jason Gurney

Constructor Summary
private CommandFactory()
          Private constructor - this class should not be instantiated.
 
Method Summary
static ICommand getBuyInsuranceCommand(IPlayerHand hand)
          Returns a new buy insurance command corresponding to the specified player hand.
static ICommand getDealCommand(IGame game)
          Returns a new deal command corresponding to the specified game.
static ICommand getDeclineInsuranceCommand(IPlayerHand hand)
          Returns a new decline insurance command corresponding to the specified player hand.
static ICommand getDoubleDownCommand(IPlayerHand hand)
          Returns a new double down command corresponding to the specified player hand.
static ICommand getHitCommand(IPlayerHand hand)
          Returns a new hit command corresponding to the specified player hand.
static ICommand getLowerBetCommand(IGame game)
          Returns a new lower bet command corresponding to the specified game.
static ICommand getRaiseBetCommand(IGame game)
          Returns a new raise bet command corresponding to the specified game.
static ICommand getShuffleCommand(IGame game)
          Returns a new shuffle command corresponding to the specified game.
static ICommand getSplitCommand(IPlayerHand hand)
          Returns a new split command corresponding to the specified player hand.
static ICommand getStandCommand(IPlayerHand hand)
          Returns a new stand command corresponding to the specified player hand.
static ICommand getSurrenderCommand(IPlayerHand hand)
          Returns a new surrender command corresponding to the specified player hand.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

CommandFactory

private CommandFactory()
Private constructor - this class should not be instantiated.
Method Detail

getHitCommand

public static ICommand getHitCommand(IPlayerHand hand)
Returns a new hit command corresponding to the specified player hand.
Parameters:
hand - the IPlayerHand command target
Returns:
a new executable ICommand

getStandCommand

public static ICommand getStandCommand(IPlayerHand hand)
Returns a new stand command corresponding to the specified player hand.
Parameters:
hand - the IPlayerHand command target
Returns:
a new executable ICommand

getDoubleDownCommand

public static ICommand getDoubleDownCommand(IPlayerHand hand)
Returns a new double down command corresponding to the specified player hand.
Parameters:
hand - the IPlayerHand command target
Returns:
a new executable ICommand

getBuyInsuranceCommand

public static ICommand getBuyInsuranceCommand(IPlayerHand hand)
Returns a new buy insurance command corresponding to the specified player hand.
Parameters:
hand - the IPlayerHand command target
Returns:
a new executable ICommand

getDeclineInsuranceCommand

public static ICommand getDeclineInsuranceCommand(IPlayerHand hand)
Returns a new decline insurance command corresponding to the specified player hand.
Parameters:
hand - the IPlayerHand command target
Returns:
a new executable ICommand

getSurrenderCommand

public static ICommand getSurrenderCommand(IPlayerHand hand)
Returns a new surrender command corresponding to the specified player hand.
Parameters:
hand - the IPlayerHand command target
Returns:
a new executable ICommand

getSplitCommand

public static ICommand getSplitCommand(IPlayerHand hand)
Returns a new split command corresponding to the specified player hand.
Parameters:
hand - the IPlayerHand command target
Returns:
a new executable ICommand

getRaiseBetCommand

public static ICommand getRaiseBetCommand(IGame game)
Returns a new raise bet command corresponding to the specified game.
Parameters:
game - the IGame command target
Returns:
a new executable ICommand

getLowerBetCommand

public static ICommand getLowerBetCommand(IGame game)
Returns a new lower bet command corresponding to the specified game.
Parameters:
game - the IGame command target
Returns:
a new executable ICommand

getDealCommand

public static ICommand getDealCommand(IGame game)
Returns a new deal command corresponding to the specified game.
Parameters:
game - the IGame command target
Returns:
a new executable ICommand

getShuffleCommand

public static ICommand getShuffleCommand(IGame game)
Returns a new shuffle command corresponding to the specified game.
Parameters:
game - the IGame command target
Returns:
a new executable ICommand

Blackjack

Copyright © 2002 amoebacode.com.