main.py
def gb_controls() -> None or str:
    """
    generates base controls.json file that can be edited afterwards
    :return:
    """
    if os.path.exists("controls.json"):
        return "EX"
    with open("controls.json", "w") as file:
        base = {
            "keyboard": {
                "left": {"kc": pygame.K_a},
                "right": {"kc": pygame.K_d},
                "motor_up": {"kc": pygame.K_w},
                "motor_down": {"kc": pygame.K_s},
                "fire": {"kc": pygame.K_e},
                "freeze": {"kc": pygame.K_SPACE}
            },
            "mouse": {
            }

        }
        json.dump(base, file)

    generates base controls.json file that can be edited afterwards
    :return:
    
generates base controls.json file that can be edited afterwards
generates base controls . json file that can be edited afterwards
def gb_controls() -> None or str:
    if os.path.exists("controls.json"):
        return "EX"
    with open("controls.json", "w") as file:
        base = {
            "keyboard": {
                "left": {"kc": pygame.K_a},
                "right": {"kc": pygame.K_d},
                "motor_up": {"kc": pygame.K_w},
                "motor_down": {"kc": pygame.K_s},
                "fire": {"kc": pygame.K_e},
                "freeze": {"kc": pygame.K_SPACE}
            },
            "mouse": {
            }
        }
        json.dump(base, file)
def gb_controls ( ) -> None or str : if os . path . exists ( "controls.json" ) : return "EX" with open ( "controls.json" , "w" ) as file : base = { "keyboard" : { "left" : { "kc" : pygame . K_a } , "right" : { "kc" : pygame . K_d } , "motor_up" : { "kc" : pygame . K_w } , "motor_down" : { "kc" : pygame . K_s } , "fire" : { "kc" : pygame . K_e } , "freeze" : { "kc" : pygame . K_SPACE } } , "mouse" : { } } json . dump ( base , file )
generates base controls.json file that can be edited afterwards
generates base controls . json file that can be edited afterwards
"""
    generates base controls.json file that can be edited afterwards
    :return:
    """
None