simplified goalsAllowedPrompt

This commit is contained in:
Jonathan Lamothe
2019-11-04 03:07:39 -05:00
parent 7fd837863b
commit d708bed77d
2 changed files with 6 additions and 3 deletions
-3
View File
@@ -53,7 +53,4 @@ goalieMinsPlayedPrompt = numPrompt "Minutes played: " $
goalsAllowedPrompt :: Prompt
goalsAllowedPrompt = numPrompt "Goals allowed: " $ \n -> do
modify (progMode.gameStateL.gameGoalsAllowed ?~ n)
mins <- fromMaybe 0 <$> gets (^.progMode.gameStateL.gameGoalieMinsPlayed)
when (mins >= gameLength) $
modify $ progMode.gameStateL.gameGoaliesRecorded .~ True
modify recordGoalieStats