Example #1
0
 public void Undo()
 {
     if (_previousBowlState == null)
     {
         throw new InvalidOperationException("No actions to undo");
     }
     StoneIDs           = _previousBowlState.StoneIDs.ToList();
     _previousBowlState = _previousBowlState.PreviousState;
     PreviewStoneIDs    = StoneIDs.ToList();
 }
Example #2
0
 public void PrepForStateChange()
 {
     _previousBowlState = new PreviousBowlState(StoneIDs.ToList(), _previousBowlState);
 }