Beispiel #1
0
    // Set up parameters for a new game
    private void NewGame()
    {
        // Initialise variables
        CurrentGameStatus = GameStatus.PLAYING;
        Turns             = 0;
        Panic             = false;
        Clock1            = CLOCK_1_INITIAL;
        Clock2            = CLOCK_2_INITIAL;
        LampWarning       = false;
        NumDeaths         = 0;
        CurrentCaveStatus = CaveStatus.OPEN;

        // Reset all items to their initial locations
        itemController.ResetItems();

        // Reset scores
        scoreController.ResetScores();

        // Reset hints
        hintController.ResetHints();

        // Reset action command trackers
        actionController.ResetTrackers();

        // Clear the visited locations
        locationController.ResetLocations();

        // Generate a new magic word
        commandsController.ResetCommands();

        // Reset dwarves
        dwarfController.ResetDwarves();

        // Reset the player
        playerController.ResetPlayer();

        // Reset the persistence mechanism
        persistenceController.ResetLastSave();
    }