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()