//restore state of the originator public static void RestoreState(Originator <T> orig, int stateNumber) { orig.SetMemento(mementoList[stateNumber]); }
//save state of the originator public static void SaveState(Originator <T> orig) { mementoList.Add(orig.CreateMemento()); }