Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
MoYoez committed Aug 3, 2023
1 parent 5f72543 commit cc89339
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions method.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ def readVarShort(self):
def readString(self):
length = self.data[self.position]
self.position += length + 1
return self.data[self.position - length : self.position].decode()
return self.data[self.position - length: self.position].decode()

def readScoreAcc(self):
self.position += 8
scoreAcc = struct.unpack("if", self.data[self.position - 8 : self.position])
scoreAcc = struct.unpack("if", self.data[self.position - 8: self.position])
return {"score": scoreAcc[0], "acc": scoreAcc[1]}

def readRecord(self, songId):
Expand All @@ -68,7 +68,7 @@ def readRecord(self, songId):
scoreAcc["difficulty"] = diff[level]
scoreAcc["rks"] = (scoreAcc["acc"] - 55) / 45
scoreAcc["rks"] = (
scoreAcc["rks"] * scoreAcc["rks"] * scoreAcc["difficulty"]
scoreAcc["rks"] * scoreAcc["rks"] * scoreAcc["difficulty"]
)
records.append(scoreAcc)
self.position = end_position
Expand Down Expand Up @@ -113,10 +113,10 @@ def parse_render_bests(gameRecord, overflow: int):
key=lambda x: x["difficulty"],
)
]
render.extend(records[: 19 + overflow])
render.extend(records[:19 + overflow])
isPhi = True
except ValueError:
render = records[: 19 + overflow]
render = records[:19 + overflow]
isPhi = False
return render, isPhi

Expand Down

0 comments on commit cc89339

Please sign in to comment.