feat: sort score from low to high

This commit is contained in:
张泊明518370910136 2024-10-01 13:15:33 -04:00
parent bc6d85811d
commit bc92b222c3

View File

@ -87,8 +87,8 @@ def generate_scoreboard(
columns.index("last_edit")
] = now # FIXME: Delete this in formal version
# Sort data by total
data.sort(key=lambda x: int(x[columns.index("total")]), reverse=True)
# Sort data by total from low to high
data.sort(key=lambda x: int(x[columns.index("total")]))
# Write back to the csv file:
with open(scoreboard_file_path, mode="w", newline="") as file: