yostinso
Class MoveGRSPMove

java.lang.Object
  |
  +--Move
        |
        +--yostinso.MoveGRSPMove

public class MoveGRSPMove
extends Move

Represents the move of a card from the GardenRow to the SuitPile class

Creation date: (11/29/2001 8:20:16 PM)

See Also:
Serialized Form

Field Summary
protected  GardenRow from
          Source.
protected  int lastSelectionPoint
          Where user last selected.
protected  Column movingColumn
          Column being dragged.
protected  SuitPile to
          Destination.
 
Constructor Summary
MoveGRSPMove(GardenRow from, Column movingColumn, SuitPile to, int lastSelectionPoint)
          MoveGRSPMove constructor comment.
 
Method Summary
 boolean doMove(Solitaire theGame)
           
 SuitPile getDestination()
          Returns destination pile (calculated by valid method).
 boolean undo(Solitaire game)
          Returns the card to the GardenRow by removing cards and inserting at proper place.
 boolean valid(Solitaire theGame)
          Validate the validity of this move.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

from

protected GardenRow from
Source.


movingColumn

protected Column movingColumn
Column being dragged.


to

protected SuitPile to
Destination.


lastSelectionPoint

protected int lastSelectionPoint
Where user last selected.

Constructor Detail

MoveGRSPMove

public MoveGRSPMove(GardenRow from,
                    Column movingColumn,
                    SuitPile to,
                    int lastSelectionPoint)
MoveGRSPMove constructor comment.

Method Detail

doMove

public boolean doMove(Solitaire theGame)

getDestination

public SuitPile getDestination()
Returns destination pile (calculated by valid method).


undo

public boolean undo(Solitaire game)
Returns the card to the GardenRow by removing cards and inserting at proper place.


valid

public boolean valid(Solitaire theGame)
Validate the validity of this move.

Note: the moving column must be composed of only a single card.