diff --git a/src/Mtlstats/Control/GoalieInput.hs b/src/Mtlstats/Control/GoalieInput.hs index 4dad19e..195f806 100644 --- a/src/Mtlstats/Control/GoalieInput.hs +++ b/src/Mtlstats/Control/GoalieInput.hs @@ -21,8 +21,22 @@ along with this program. If not, see . module Mtlstats.Control.GoalieInput (goalieInput) where +import Lens.Micro ((^.)) + import Mtlstats.Types -- | The dispatcher for handling goalie input goalieInput :: GameState -> Controller -goalieInput = undefined +goalieInput gs + | null $ gs^.gameSelectedGoalie = selectGoalieC + | null $ gs^.goalieMinsPlayed = minsPlayedC + | otherwise = goalsAllowedC + +selectGoalieC :: Controller +selectGoalieC = undefined + +minsPlayedC :: Controller +minsPlayedC = undefined + +goalsAllowedC :: Controller +goalsAllowedC = undefined