com.blackledge.david.game.solitaire
Class FreeCellMemento
java.lang.Object
com.blackledge.david.game.solitaire.FreeCellMemento
public class FreeCellMemento
- extends Object
A Memento of FreeCellGame
that can copy and restore the entire state
of the game.
- Version:
- $Revision: 1.1 $
Method Summary |
void |
restore(FreeCellGame game)
set the state of the game to match this Memento. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FreeCellMemento
public FreeCellMemento(FreeCellGame game)
- Store the state of the supplied game for later restoration.
- Parameters:
game
-
restore
public void restore(FreeCellGame game)
- set the state of the game to match this Memento.
- Parameters:
game
- Game instance to restore to this state.