upgrade this code by adding two gamemodes, beat the bomb and classic mode:                          import random
import time
import os

#This gives the print a typewriter affect. I learned this from a YouTube video.
def typewriter_print(text, delay=0.03):
    for char in text:
        print(char, end='', flush=True)
        time.sleep(delay)
    print()

#This is the title screen of my game.
#This title screen will slowly appear into the terminal displaying the big WELCOME.
#I got the big WELCOME display from https://patorjk.com 
def title_screen():
    title = """
 
 ____      ____  ________  _____       ______    ___   ____    ____  ________  
|_  _|    |_  _||_   __  ||_   _|    .' ___  | .'   .|_   \  /   _||_   __  | 
  \ \  /\  / /    | |_ \_|  | |     / .'   \_|/  .-.  \ |   \/   |    | |_ \_| 
   \ \/  \/ /     |  _| _   | |   _ | |       | |   | | | |\  /| |    |  _| _  
    \  /\  /     _| |__/ | _| |__/ |\ .___.'\\  -'  /_| |_\/_| |_  _| |__/ | 
     \/  \/     |________||________| .____ .' .___.'|_____||_____||________| 
                                                                               

    """
    os.system ('cls' if os.name == 'nt' else 'clear')  # Clear screen
    for line in title.split("\n"):
        typewriter_print(line,0.005)
    time.sleep(1)

#This is another welcoming message to the player. 
#It will typewriter print the message to engage the player.
def show_title():
    typewriter_print("🎮Welcome to my word guessing game🎈")
    typewriter_print("--------------------------------")

#This is the word list of each difficulty and asks the player to pick the difficulty. 
# If the player inputs something that isn't easy, medium or hard. It will output invalid choice and ask the player to input the difficutly. 
def wordlist():
    words_list = {
        "easy": ["jade", "love", "beta", "fall", "game"],
        "medium": ["python", "script", "binary", "server", "backup"],
        "hard": ["software", "hardware", "database", "compiler", "protocol"]
    }

    difficulty = input("Choose difficulty (easy, medium, hard): ").lower().upper()
    while difficulty not in words_list:
        typewriter_print("❌ Invalid choice.")
        difficulty = input("Choose difficulty (easy, medium, hard): ").lower()

    return random.choice(words_list[difficulty])

#This function is to show the rules to the player. 
def show_rules():
    typewriter_print("\n📜 Game Rules:")
    typewriter_print("1️⃣ Guess the secret word one letter at a time.")
    typewriter_print("2️⃣ You have 10 incorrect attempts.")
    typewriter_print("3️⃣ Good luck!\n")


#This are the stages for my beat the bomb gamemode. 
#The bomb is a nuke which will go down each time the player gets a wrong letter.
#Like the classic mode, the bomb 'explodes' if the player gets 10 incorrect guesses.
def stages(tries):
    bomb_stages = [
        """ 
        |\**/|      
        \ == /
         |  |
         |  |
         \  /
          \/
          
          """,
          """
      |\**/|      
      \ == /
       |  |*
       |  |
       \  /
        \/ 
        """,
        """
   
   
   |\**/|      
   \ == /
    |  |*
    |  |
    \  /*
     \/ 



""",
"""
   
   
   
   |\**/|      
   \ == /
    |  |*
    |  |
    \  /*
     \/ 



""",
"""
  
   
  
   
   |\**/|      
   \ == /
    |  |*
    |  |
    \  /*
     \/ 



""",
"""
  
  
   
    
     
   |\**/|      
   \ == /
    |  |*
    |  |
    \  /*
     \/ 



""",
"""
   |\**/|      
   \ == /
    |  |*
    |  |
    \  /*
     \/ 



""",
"""
   
   |\**/|      
   \ == /
    |  |*
    |  |
    \  /*
     \/ 



""",
"""
   |\**/|      
   \ == /
    |  |*
    |  |
    \  /*
     \/ 



""",
"""
   |\**/|      
   \ == /
    |  |*
    |  |
    \  /*
     \/ 



""",
"""
    _.-^^---....,,--       
 _--                  --_  
<                        >)
|         BOOM!!          | 
 \._                   _./  
    
--. . , ; .--'''       
          | |   |             
       .-=||  | |=-.   
       `-=#$%&%$#=-'   
          | ;  :|     
 _____.,-#%&$@%#&#~,._____
💥💥💥💥💥💥💥💥💥💥💥




"""
    ]
    
    stage_index = 10 - tries
    if 0 <= stage_index < len(stages):
        print(stages[stage_index])
    else:
        print(stages[-1])
        
        
        
        
        
def classic_game(secret_word):
    guessed_word = ["_"] * len(secret_word)
    guessed_letters = []
    attempts = 10

    typewriter_print("\nLet's begin!")
    print("Word:", " ".join(guessed_word))

    while attempts > 0 and "_" in guessed_word:
        guess = input("Guess a letter: ").lower()

        if not guess.isalpha() or len(guess) != 1:
            typewriter_print("❗ Please enter a single letter.")
            continue

        if guess in guessed_letters:
            typewriter_print("❗ You already guessed that letter.")
            continue

        guessed_letters.append(guess)

        if guess in secret_word:
            for i in range(len(secret_word)):
                if secret_word[i] == guess:
                    guessed_word[i] = guess
            typewriter_print("✅ Good guess!")
        else:
            attempts -= 1
            typewriter_print(f"❌ Wrong guess! Attempts left: {attempts}")

        print("Word:", " ".join(guessed_word))

    if "_" not in guessed_word:
        typewriter_print("🎉 You guessed the word!")
    else:
        typewriter_print(f"💀 You ran out of attempts. The word was: {secret_word}")



def main():
    title_screen()
    show_title()
    show_rules()

    
    main()