Ejemplo n.º 1
0
        public void NextGame()
        {
            try
            {
                if (CurrentGame != null)
                {
                    CurrentGame.DrawRequest     -= GameDrawRequest;
                    CurrentGame.UpdateUIElement -= GameUpdateUIElement;
                    CurrentGame.Finish();
                }

                history.GamesPlayed++;
                CurrentGame = game_manager.GetPuzzle();
                CurrentGame.SynchronizingObject = SynchronizingObject;
                CurrentGame.DrawRequest        += GameDrawRequest;
                CurrentGame.UpdateUIElement    += GameUpdateUIElement;

                CurrentGame.Begin();

                CurrentGame.GameTime = TimeSpan.Zero;
                Status = SessionStatus.Playing;
            }
            catch (Exception e)
            {
                Console.WriteLine("GameSession.NextGame {0}", e);
            }
        }