recordGoalieStats should bump a goalie's game count only once per game

This commit is contained in:
Jonathan Lamothe committed 2019-11-01 17:23:57 -04:00
1 parent a63d822f02
commit 4fab3ec285
3 files changed
+62 -44

No files matched your search

+6
View File
@@ -285,7 +285,13 @@ recordGoalieStats s = fromMaybe s $ do
goals <- gs^.goalsAllowed
let
gameStats = M.findWithDefault newGoalieStats gid $ gs^.gameGoalieStats
bumpVal = if gameStats^.gsGames == 0
then 1
else 0
bumpStats gs = gs
& gsGames +~ bumpVal
& gsMinsPlayed +~ mins
& gsGoalsAllowed +~ goals