Пример #1
0
        public void End()
        {
            // Making a deep copy of GameSessionHistory type (base class) for serialization
            player_history.SaveGameSession(history.Copy());

            if (CurrentGame != null)
            {
                CurrentGame.DrawRequest     -= GameDrawRequest;
                CurrentGame.UpdateUIElement -= GameUpdateUIElement;
                CurrentGame.Finish();
            }

            EnableTimer = false;
            timer.SynchronizingObject = null;

            paused      = false;
            CurrentGame = null;
            Status      = SessionStatus.Finished;
        }