public final void levelDone () {
        if (!inGameState("InGame") || inGameState("LevelDone")
            || inGameState("LifeLost") || inGameState("GameWon") || inGameState("GameOver")) return;
        // System.err.println(
        // "Warning: levelDone() called from other state than InGame." );
        // }
        clearKey(key_continuegame);
        removeGameState("StartLevel");
        removeGameState("StartGame");
        seqtimer = 0;
        if (leveldone_ticks > 0) {
            if (leveldone_ingame)
                addGameState("LevelDone");
            else setGameState("LevelDone");
            new JGTimer(leveldone_ticks, true, "LevelDone") {
                public void alarm () {
                    levelDoneToStartLevel();
                }
            };
        }
        else {
            levelDoneToStartLevel();
        }
    }