Exemple #1
0
        public void MoveCurrentStateCells(int from, int to)
        {
            int buffer = _currentState[from];

            _currentState[from] = _currentState[to];
            _currentState[to]   = buffer;

            if (CheckToWin())
            {
                OnShowWinScreen?.Invoke();
                return;
            }

            if (CheckToLoose())
            {
                OnShowLoseScreen?.Invoke();
            }
        }
Exemple #2
0
 public static void RaiseShowWinScreenEvent() => OnShowWinScreen?.Invoke();