Skip to content

Commit

Permalink
fix: CS only if played more than 60 mins
Browse files Browse the repository at this point in the history
  • Loading branch information
jonassimoen committed Jan 25, 2024
1 parent 0d82cef commit 9c78683
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 @@ -81,7 +81,7 @@ export const calculatePoints = (playerStat: Statistic, positionId: number): numb
// Goals against
tempPoints += (Math.floor(playerStat.goalsAgainst / 2) || 0) * PPS.CONCEDED_2[positionId];
// Clean sheet
tempPoints += (playerStat.goalsAgainst || 0 ) === 0 ? PPS.CLEAN_SHEET[positionId] : 0;
tempPoints += (playerStat.minutesPlayed >= 60 && (playerStat.goalsAgainst || 0 ) === 0) ? PPS.CLEAN_SHEET[positionId] : 0;
// Passing accuracy above 85%
tempPoints += playerStat.totalPasses !== 0 && (playerStat.accuratePasses / playerStat.totalPasses > 0.85) ? PPS.PASS_ACCURACY_MORE_85[positionId] : 0;
// Key passes (per 2)
Expand Down

0 comments on commit 9c78683

Please sign in to comment.