Example #1
0
 public void GenerateFreshGame(InitialRooms.ID initialRoomID = defaultInitialRoom)
 {
     mLastCommandResponse = newGameCommand;
     mInventory           = new Inventory();
     mRoom          = new Room();
     mGameTime      = new GameTime();
     mNPCIdentities = InitialRooms.identityData;
     InitialRooms.Initialize();
     mRoom.CreateFrom(initialRoomID, this);
 }
Example #2
0
        // Returns true if the game was successfully parsed
        public bool ParsePreviousText(string inputText)
        {
            string[] lines = inputText.Split('\n');

            if (lines.Length != numTotalRows)
            {
                return(false);
            }

            string saveDataLine = lines[saveDataRowIndex];

            mRoom          = new Room();
            mInventory     = new Inventory();
            mGameTime      = new GameTime();
            mNPCIdentities = new Dictionary <int, NPCIdentityData>();
            InitialRooms.Initialize();

            Load(saveDataLine);

            return(true);
        }