Skip to content

Commit

Permalink
fix: pass accuracy if more than 10 passes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonassimoen committed Jun 15, 2024
1 parent 413fa1b commit 27fd47f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/PointsCalculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export const calculatePoints = (playerStat: Statistic, positionId: number | null

//// PASSING
// Passing accuracy above 85%
tempPoints += playerStat.totalPasses !== 0 && (playerStat.accuratePasses / playerStat.totalPasses > 0.85) ? PPS.PASS_ACCURACY_MORE_85[positionId] : 0;
tempPoints += playerStat.totalPasses > 10 && (playerStat.accuratePasses / playerStat.totalPasses > 0.85) ? PPS.PASS_ACCURACY_MORE_85[positionId] : 0;
// Key passes (per 2)
tempPoints += (Math.floor(playerStat.keyPasses / 2) || 0) * PPS.KEY_PASSES_PER_2[positionId];
// Accurate crosses (per 2)
Expand Down

0 comments on commit 27fd47f

Please sign in to comment.