Skip to content

Commit

Permalink
hiscore
Browse files Browse the repository at this point in the history
  • Loading branch information
tailuge committed Jun 6, 2024
1 parent 0bb971d commit 096cfcb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/diagram.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/events/recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ export class Recorder {
return
}
const breakScore =
this.container.rules.previousBreak > 0
this.container.rules.currentBreak === 0
? this.container.rules.previousBreak
: this.shotCount(currentBreak.shots)
: this.container.rules.currentBreak
const text = `break(${breakScore})`
const serialisedShot = JSON.stringify(currentBreak)
const compressed = JSONCrush.crush(serialisedShot)
this.generateLink(text, compressed, "black")
if (currentBreak.score >= 4) {
if (breakScore >= 4) {
this.generateHiScoreLink(compressed)
}
}
Expand Down

0 comments on commit 096cfcb

Please sign in to comment.