|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Move | +--brlandry.ColumnToPileMove
Field Summary | |
protected Column |
from
|
protected Card |
movingCard
|
protected Pile |
to
|
Constructor Summary | |
ColumnToPileMove(Column from,
Card movingCard,
Pile to)
|
Method Summary | |
protected boolean |
aceOverKing(int rank)
Helper function to determine a "hypothetical card" is an Ace and if the top card on the "to" pile is a King. |
boolean |
doMove(Solitaire theGame)
Execute the move |
protected boolean |
oneMore(int rank)
Helper function to determine a "hypothetical card" has a rank of one greater than the top card on the "to" pile. |
protected boolean |
sameSuit(int suit)
Helper function to determine a "hypothetical card" is of the same suit as the to pile. |
boolean |
undo(Solitaire theGame)
Undo move (and score) |
boolean |
valid(Solitaire theGame)
Moves can determine their validity. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Column from
protected Pile to
protected Card movingCard
Constructor Detail |
public ColumnToPileMove(Column from, Card movingCard, Pile to)
Method Detail |
public boolean valid(Solitaire theGame)
protected boolean sameSuit(int suit)
protected boolean oneMore(int rank)
protected boolean aceOverKing(int rank)
public boolean doMove(Solitaire theGame)
public boolean undo(Solitaire theGame)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |