|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Move | +--brlandry.ColumnToColumnMove
This class represents moves between Columns. It supports moves initiated by mousedrags or by the computer to solve the game.
Field Summary | |
protected Column |
from
|
protected Card |
movingCard
|
protected Column |
to
|
Constructor Summary | |
ColumnToColumnMove(Column from,
Card movingCard,
Column to)
|
Method Summary | |
boolean |
doMove(Solitaire theGame)
Moves can execute themselves |
protected boolean |
kingOverAce(int rank)
Helper function to determine if a King is being placed on an Ace. |
protected boolean |
oneLess(int rank)
Helper function to be used when movingCard is null |
boolean |
undo(Solitaire theGame)
Undo |
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 Column to
protected Card movingCard
Constructor Detail |
public ColumnToColumnMove(Column from, Card movingCard, Column to)
Method Detail |
public boolean valid(Solitaire theGame)
protected boolean oneLess(int rank)
protected boolean kingOverAce(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 |