|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ks.common.model.Move | +--heineman.klondike.MoveWasteToFoundationMove
Represents the move of a card from the waste pile to the foundation
Field Summary | |
protected Card |
draggingCard
The Card being dragged. |
protected Pile |
foundation
The Foundation Pile. |
protected Pile |
waste
The Waste Pile. |
Constructor Summary | |
MoveWasteToFoundationMove(Pile waste,
Card draggingCard,
Pile foundation)
MoveWasteToFoundationMove constructor. |
Method Summary | |
boolean |
doMove(Solitaire theGame)
Each move should knows how to execute itself. |
boolean |
undo(ks.common.games.Solitaire game)
Move the card back to the waste pile. |
boolean |
valid(ks.common.games.Solitaire game)
Action for Klondike: WastePile card dragged to Foundation Pile. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Pile waste
protected Card draggingCard
protected Pile foundation
Constructor Detail |
public MoveWasteToFoundationMove(Pile waste, Card draggingCard, Pile foundation)
If draggingCard
is null, then the move has not yet been initiated, and
a card is to be removed from waste and added to foundation.
If draggingCard
is not null, then waste has already been modified, and
the card removed from the top of the waste pile is draggingCard
.
Method Detail |
public boolean doMove(Solitaire theGame)
Creation date: (10/21/01 3:33:39 PM)
public boolean undo(ks.common.games.Solitaire game)
Note: in Undo, we always ignore the 'draggingCard' because the move has already happened.
public boolean valid(ks.common.games.Solitaire game)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |