Skip to content

Commit

Permalink
fix no phi bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
MoYoez committed Aug 3, 2023
1 parent 23a6468 commit 5f72543
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions method.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,17 @@ def parse_render_bests(gameRecord, overflow: int):
record = reader.readRecord(songId)
records.extend(record)
records.sort(key=lambda x: x["rks"], reverse=True)
render = [
max(
filter(lambda x: x["score"] == 1000000, records),
key=lambda x: x["difficulty"],
)
]
render.extend(records[: 19 + overflow])
if render[0]["score"] == 1000000:
try:
render = [
max(
filter(lambda x: x["score"] == 1000000, records),
key=lambda x: x["difficulty"],
)
]
render.extend(records[: 19 + overflow])
isPhi = True
else:
except ValueError:
render = records[: 19 + overflow]
isPhi = False
return render, isPhi

Expand Down

0 comments on commit 5f72543

Please sign in to comment.