public static void RestoreState(Originator <T> orig, int stateNumber) { orig.State = list[stateNumber].State; // orig.SetMomento(list[stateNumber]); }
public static void SaveState(Originator <T> obj) { list.Add(obj.CreateMomento()); }