Changed order of functions.

This commit is contained in:
alwayscompiling
2022-07-22 21:41:45 -04:00
parent 65ce143cfc
commit b78eb7b9bf
+16 -16
View File
@@ -7,6 +7,22 @@ HIGHSCORES_CONFIG_FILE = "highscores_config.json"
HIGHSCORES_DATA_FILE = "highscores_data.json"
def create_message_map(data: dict):
"""
Creates a message map from input highscores data.
@param data: highscores_data dict to create map from.
@return: dict message_map of message to boss.
"""
message_map = {}
for boss, info in data["tables"].items():
message_map[info["message_id"]] = boss
return message_map
def open_highscores_config():
"""
Opens the highscores config file and returns.
@@ -39,22 +55,6 @@ def open_highscores_data():
return data
def create_message_map(data: dict):
"""
Creates a message map from input highscores data.
@param data: highscores_data dict to create map from.
@return: dict message_map of message to boss.
"""
message_map = {}
for boss, info in data["tables"].items():
message_map[info["message_id"]] = boss
return message_map
def save_highscores_data(data):
"""
Saves the highscores data dict into a json file.