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