refactored game entry control flow

This commit is contained in:
Jonathan Lamothe
2019-11-25 23:58:11 -05:00
parent f1f7077c8c
commit 8795cb46a9
5 changed files with 60 additions and 97 deletions
+3 -2
View File
@@ -65,8 +65,9 @@ homeScorePrompt = numPrompt "Home score: " $
-- | Prompts for the away score
awayScorePrompt :: Prompt
awayScorePrompt = numPrompt "Away score: " $
modify . (progMode.gameStateL.awayScore ?~)
awayScorePrompt = numPrompt "Away score: " $ \score -> modify
$ overtimeCheck
. (progMode.gameStateL.awayScore ?~ score)
-- | Prompts for the player who scored the goal
recordGoalPrompt