示例#1
0
 public StateChangedEventArgs(Core.State oldState,
                              Core.Move move,
                              Core.State newState,
                              bool isUndo = false)
 {
     OldState = oldState;
     Move     = move;
     NewState = newState;
     IsUndo   = isUndo;
 }
示例#2
0
 private void OnStateChanged(Core.State oldState,
                             Core.Move move,
                             Core.State newState,
                             bool isUndo = false)
 {
     if (StateChanged != null)
     {
         StateChanged(this, new StateChangedEventArgs(
                          oldState, move, newState, isUndo));
     }
     NotifyPropertyChanged("MoveCount");
     if (oldState != null && newState != null && PuzzleSolved != null)
     {
         if (!oldState.IsWinning && newState.IsWinning)
         {
             PuzzleSolved(this, new EventArgs());
         }
     }
 }