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

This commit is contained in:
Jonathan Lamothe
2019-11-01 17:23:57 -04:00
parent a63d822f02
commit 4fab3ec285
3 changed files with 62 additions and 44 deletions

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