Blackjack

com.amoebacode.blackjack.command
Class AvailableHandCommands

java.lang.Object
  |
  +--com.amoebacode.blackjack.command.AvailableCommands
        |
        +--com.amoebacode.blackjack.command.AvailableHandCommands

public class AvailableHandCommands
extends AvailableCommands

AvailableHandCommands tracks a set of currently available player hand commands.

Version:
0.9
Author:
Jason Gurney

Field Summary
private static java.lang.String COMMAND_BUY_INSURANCE
          A String representing the buy insurance command
private static java.lang.String COMMAND_DECLINE_INSURANCE
          A String representing the decline insurance command
private static java.lang.String COMMAND_DOUBLE_DOWN
          A String representing the double down command
private static java.lang.String COMMAND_HIT
          A String representing the hit command
private static java.lang.String COMMAND_SPLIT
          A String representing the split command
private static java.lang.String COMMAND_STAND
          A String representing the stand command
private static java.lang.String COMMAND_SURRENDER
          A String representing the surrender command
 
Fields inherited from class com.amoebacode.blackjack.command.AvailableCommands
commands
 
Constructor Summary
AvailableHandCommands()
          Default public constructor.
 
Method Summary
 boolean isBuyInsuranceAvailable()
          Indicates whether the buy insurance command is currently available.
 boolean isCommandAvailable()
          Indicates whether any command is currently available.
 boolean isDeclineInsuranceAvailable()
          Indicates whether the decline insurance command is currently available.
 boolean isDoubleDownAvailable()
          Indicates whether the double down command is currently available.
 boolean isHitAvailable()
          Indicates whether the hit command is currently available.
 boolean isOfferingInsurance()
          Indicates whether an insurance offer is present.
 boolean isSplitAvailable()
          Indicates whether the split command is currently available.
 boolean isStandAvailable()
          Indicates whether the stand command is currently available.
 boolean isSurrenderAvailable()
          Indicates whether the surrender command is currently available.
 void setBuyInsuranceAvailable()
          Sets the availability of the buy insurance command.
 void setDeclineInsuranceAvailable()
          Sets the availability of the decline insurance command.
 void setDoubleDownAvailable()
          Sets the availability of the double down command.
 void setHitAvailable()
          Sets the availability of the hit command.
 void setSplitAvailable()
          Sets the availability of the split command.
 void setStandAvailable()
          Sets the availability of the stand command.
 void setSurrenderAvailable()
          Sets the availability of the surrender command.
 
Methods inherited from class com.amoebacode.blackjack.command.AvailableCommands
addAvailableCommand, isAvailableCommand
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

COMMAND_HIT

private static final java.lang.String COMMAND_HIT
A String representing the hit command

COMMAND_DOUBLE_DOWN

private static final java.lang.String COMMAND_DOUBLE_DOWN
A String representing the double down command

COMMAND_STAND

private static final java.lang.String COMMAND_STAND
A String representing the stand command

COMMAND_SURRENDER

private static final java.lang.String COMMAND_SURRENDER
A String representing the surrender command

COMMAND_SPLIT

private static final java.lang.String COMMAND_SPLIT
A String representing the split command

COMMAND_BUY_INSURANCE

private static final java.lang.String COMMAND_BUY_INSURANCE
A String representing the buy insurance command

COMMAND_DECLINE_INSURANCE

private static final java.lang.String COMMAND_DECLINE_INSURANCE
A String representing the decline insurance command
Constructor Detail

AvailableHandCommands

public AvailableHandCommands()
Default public constructor.
Method Detail

isHitAvailable

public boolean isHitAvailable()
Indicates whether the hit command is currently available.
Returns:
true if hit is available

setHitAvailable

public void setHitAvailable()
Sets the availability of the hit command.

isDoubleDownAvailable

public boolean isDoubleDownAvailable()
Indicates whether the double down command is currently available.
Returns:
true if double down is available

setDoubleDownAvailable

public void setDoubleDownAvailable()
Sets the availability of the double down command.

isStandAvailable

public boolean isStandAvailable()
Indicates whether the stand command is currently available.
Returns:
true if stand is available

setStandAvailable

public void setStandAvailable()
Sets the availability of the stand command.

isSurrenderAvailable

public boolean isSurrenderAvailable()
Indicates whether the surrender command is currently available.
Returns:
true if surrender is available

setSurrenderAvailable

public void setSurrenderAvailable()
Sets the availability of the surrender command.

isSplitAvailable

public boolean isSplitAvailable()
Indicates whether the split command is currently available.
Returns:
true if split is available

setSplitAvailable

public void setSplitAvailable()
Sets the availability of the split command.

isBuyInsuranceAvailable

public boolean isBuyInsuranceAvailable()
Indicates whether the buy insurance command is currently available.
Returns:
true if buy insurance is available

setBuyInsuranceAvailable

public void setBuyInsuranceAvailable()
Sets the availability of the buy insurance command.

isDeclineInsuranceAvailable

public boolean isDeclineInsuranceAvailable()
Indicates whether the decline insurance command is currently available.
Returns:
true if decline insurance is available

setDeclineInsuranceAvailable

public void setDeclineInsuranceAvailable()
Sets the availability of the decline insurance command.

isOfferingInsurance

public boolean isOfferingInsurance()
Indicates whether an insurance offer is present.
Returns:
true if insurance is being offered

isCommandAvailable

public boolean isCommandAvailable()
Indicates whether any command is currently available.
Returns:
true if any hand command is available

Blackjack

Copyright © 2002 amoebacode.com.