framework for recording assists

This commit is contained in:
Jonathan Lamothe
2019-09-25 02:44:42 -04:00
parent 8c8a2d52a6
commit ffdb8e1e8c
2 changed files with 16 additions and 7 deletions

View File

@@ -53,7 +53,7 @@ dispatch s = case s^.progMode of
| null $ gs^.awayScore -> awayScoreC
| null $ gs^.overtimeFlag -> overtimeFlagC
| not $ gs^.dataVerified -> verifyDataC
| fromJust (unaccountedPoints gs) -> recordGoalC
| fromJust (unaccountedPoints gs) -> goalInput gs
| otherwise -> reportC
CreatePlayer cps
| null $ cps^.cpsNumber -> getPlayerNumC
@@ -182,6 +182,11 @@ verifyDataC = Controller
return True
}
goalInput :: GameState -> Controller
goalInput gs
| null (gs^.goalBy) = recordGoalC
| otherwise = recordAssistC
recordGoalC :: Controller
recordGoalC = Controller
{ drawController = \s -> let
@@ -195,6 +200,9 @@ recordGoalC = Controller
return True
}
recordAssistC :: Controller
recordAssistC = undefined
reportC :: Controller
reportC = Controller
{ drawController = \s -> do