Blackjack

com.amoebacode.blackjack.command
Class PlayerHandCommand

java.lang.Object
  |
  +--com.amoebacode.blackjack.command.PlayerHandCommand
All Implemented Interfaces:
ICommand
Direct Known Subclasses:
BuyInsuranceCommand, DeclineInsuranceCommand, DoubleDownCommand, HitCommand, SplitCommand, StandCommand, SurrenderCommand

abstract class PlayerHandCommand
extends java.lang.Object
implements ICommand

PlayerHandCommand is the base class for all player hand commands.

Version:
0.9
Author:
Jason Gurney

Field Summary
private  IPlayerHand playerHand
          The player hand target for this command
 
Constructor Summary
protected PlayerHandCommand(IPlayerHand playerHand)
          Default protected constructor.
 
Method Summary
abstract  void execute()
          Executes this player hand command.
protected  IPlayerHand getPlayerHand()
          Returns the player hand target for this command.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

playerHand

private IPlayerHand playerHand
The player hand target for this command
Constructor Detail

PlayerHandCommand

protected PlayerHandCommand(IPlayerHand playerHand)
Default protected constructor.
Parameters:
playerHand - the IPlayerHand target for this command
Method Detail

execute

public abstract void execute()
Executes this player hand command.
Specified by:
execute in interface ICommand

getPlayerHand

protected IPlayerHand getPlayerHand()
Returns the player hand target for this command.
Returns:
this command's IPlayerHand target

Blackjack

Copyright © 2002 amoebacode.com.