Esempio n. 1
0
        /// <summary>
        /// Loads the game from the given save file
        /// </summary>
        /// <param name="saveFile">the path to the save file</param>
        private static void LoadGame(string saveFile)
        {
            // Reset the random generator
            RandomFactory.Reset();

            // Reset the id factory
            IdFactory.ResetIdFactory();

            // Create the GamePlay simulator
            GamePlay sim = new GamePlay(saveFile);

            // Replace this instance of Game with the simulated one
            game = sim.GetLoadedGame();
        }