heineman.klondike
Class DealCardMove

java.lang.Object
  |
  +--ks.common.model.Move
        |
        +--heineman.klondike.DealCardMove

public class DealCardMove
extends ks.common.model.Move

Represents the moving of a card from the deck to the waste pile.

There are two parameters for this move:

deck = Deck which deals the cards
wastePile = Pile to which the card is dealt.

Creation date: (10/28/01 8:50:54 AM)

See Also:
Serialized Form

Field Summary
protected  Deck deck
          The deck.
protected  Pile wastePile
          The wastePile.
 
Constructor Summary
DealCardMove(Deck deck, Pile wastePile)
          DealCardMove constructor.
 
Method Summary
 boolean doMove(ks.common.games.Solitaire game)
          Do Move
 boolean undo(ks.common.games.Solitaire game)
          To undo this move, we move the cards from the wastePile back to the Deck.
 boolean valid(ks.common.games.Solitaire game)
          Action for Klondike: Deal card from deck to wastePile.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deck

protected Deck deck
The deck.


wastePile

protected Pile wastePile
The wastePile.

Constructor Detail

DealCardMove

public DealCardMove(Deck deck,
                    Pile wastePile)
DealCardMove constructor.

Method Detail

doMove

public boolean doMove(ks.common.games.Solitaire game)
Do Move


undo

public boolean undo(ks.common.games.Solitaire game)
To undo this move, we move the cards from the wastePile back to the Deck.


valid

public boolean valid(ks.common.games.Solitaire game)
Action for Klondike: Deal card from deck to wastePile.