Files
plateformer-evolve/main.py
T

21 lines
701 B
Python

from dotenv import load_dotenv
from game.game import Game
from game.gameState import GameState
from game.handlers import GAME_HANDLERS
from game.map import Map
from game.mapReader import MapReader
from game.mapSet import MapSet
# loading variables from .env file
load_dotenv()
if __name__ == "__main__":
# Make the user choose the game handler
print("Choose a game handler:")
for i, handler_name in enumerate(GAME_HANDLERS.keys()):
print(f"[{i + 1}] {handler_name}")
choice = int(input("Enter the number of the game handler: ")) - 1
handler_name = list(GAME_HANDLERS.keys())[choice]
game_handler_class = GAME_HANDLERS[handler_name]()
game_handler_class.run()