Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import shutil
- import time
- def clear_screen():
- os.system('clear')
- def display_welcome_message():
- # Get the terminal window size
- columns, rows = shutil.get_terminal_size()
- # The message to display
- message = "Welcome to Edmund's Homepage!"
- # Calculate the position to center the message
- centered_message = message.center(columns)
- # Print the message at the top center
- print(f"\033[1;1H{centered_message}")
- def display_ascii_art():
- ascii_art = """
- /─────────────────────────────────────────┐
- /│ -PROJECTS-PROJECTS-PROJECTS-PROJECTS- │
- │ ├─────────────────────────────────────────┤
- │ │ SkyDefenders │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ │ │
- │ /─────────────────────────────────────────/
- │/_________________________________________/
- """
- print(ascii_art)
- def run_skydef():
- os.system('python3 airplane_shooter.py')
- # Wait a moment to allow the user to see the completion message
- time.sleep(2)
- def main():
- while True:
- clear_screen()
- display_welcome_message()
- display_ascii_art()
- choice = input("Select an option (type 'SkyDef' to run it): ").strip()
- if choice.lower() == 'skydef':
- run_skydef()
- else:
- print("Invalid option. Returning to homepage...")
- time.sleep(2)
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement