public StateChangedEventArgs(Core.State oldState, Core.Move move, Core.State newState, bool isUndo = false) { OldState = oldState; Move = move; NewState = newState; IsUndo = isUndo; }
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()); } } }