from GameController import GameController  # Import the GameController class
from Log import Log, DEBUG, INFO, ERROR, NONE  # Import log levels for clarity

def main():
    try:
        # Set the logging level (DEBUG, INFO, ERROR, NONE)
        Log.setLevel(DEBUG)  # This will print all debug messages to the console
        Log.setName("StopLightGame")  # Set a project name for all log messages

        Log.i("Initializing the game...")

        # Initialize the game controller
        game = GameController()

        Log.i("Starting the main game loop...")

        # Start the main game loop
        game.game_loop()

    except TypeError as te:
        Log.e(f"TypeError occurred: {te}")
    except Exception as e:
        Log.e(f"An error occurred: {e}")

if __name__ == "__main__":
    main()
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT