com.blackledge.david.game.solitaire
Class SolitaireMemento

java.lang.Object
  extended by 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 $

Constructor Summary
SolitaireMemento(SolitaireGame game)
          Store the state of the supplied game for later restoration.
 
Method Summary
 void restore(SolitaireGame 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
 

Constructor Detail

SolitaireMemento

public SolitaireMemento(SolitaireGame game)
Store the state of the supplied game for later restoration.

Parameters:
game -
Method Detail

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.