Skip to content

Commit

Permalink
Fix rtc bug
Browse files Browse the repository at this point in the history
  • Loading branch information
magnetenstad committed Oct 8, 2023
1 parent 91060de commit 99546a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/games/rtc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export const getRtcLegScore = (game: Game, visits: Visit[]) => {
const getVisitScore = (game: Game, visit: Visit) => {
const isFast = getTypeAttribute<Boolean>(game, 'fast', false)
return sumNumbers(
visit.map((seg) => (seg ? (isFast ? seg.multiplier : 1) : 0))
visit.map((seg) =>
seg ? (isFast ? seg.multiplier : Math.min(1, seg.sector)) : 0
)
)
}

0 comments on commit 99546a1

Please sign in to comment.