whitespace fix

This commit is contained in:
Jonathan Lamothe 2019-08-31 11:27:02 -04:00
parent 9f076db27b
commit f718757bea
3 changed files with 11 additions and 11 deletions

View File

@ -43,20 +43,20 @@ handleEvent e = gets (view progMode) >>= \case
MainMenu -> menuHandler mainMenu e MainMenu -> menuHandler mainMenu e
NewSeason -> menuHandler newSeasonMenu e >> return True NewSeason -> menuHandler newSeasonMenu e >> return True
NewGame gs NewGame gs
| null $ gs ^. gameType -> do | null $ gs^.gameType -> do
menuHandler gameTypeMenu e menuHandler gameTypeMenu e
return True return True
| null $ gs ^. otherTeam -> do | null $ gs^.otherTeam -> do
promptHandler otherTeamPrompt e promptHandler otherTeamPrompt e
return True return True
| null $ gs ^. homeScore -> do | null $ gs^.homeScore -> do
promptHandler homeScorePrompt e promptHandler homeScorePrompt e
return True return True
| null $ gs ^. awayScore -> do | null $ gs^.awayScore -> do
promptHandler awayScorePrompt e promptHandler awayScorePrompt e
modify overtimeCheck modify overtimeCheck
return True return True
| null $ gs ^. overtimeFlag -> do | null $ gs^.overtimeFlag -> do
overtimePrompt e overtimePrompt e
>>= modify . (progMode.gameStateL.overtimeFlag .~) >>= modify . (progMode.gameStateL.overtimeFlag .~)
modify updateGameStats modify updateGameStats

View File

@ -75,7 +75,7 @@ newSeasonMenu = Menu "*** SEASON TYPE ***" ()
gameTypeMenu :: Menu () gameTypeMenu :: Menu ()
gameTypeMenu = Menu "*** GAME TYPE ***" () gameTypeMenu = Menu "*** GAME TYPE ***" ()
[ MenuItem '1' "Home Game" $ [ MenuItem '1' "Home Game" $
modify $ progMode . gameStateL . gameType ?~ HomeGame modify $ progMode.gameStateL.gameType ?~ HomeGame
, MenuItem '2' "Away Game" $ , MenuItem '2' "Away Game" $
modify $ progMode . gameStateL . gameType ?~ AwayGame modify $ progMode.gameStateL.gameType ?~ AwayGame
] ]

View File

@ -96,17 +96,17 @@ numPrompt pStr act = Prompt
-- | Prompts for the other team name -- | Prompts for the other team name
otherTeamPrompt :: Prompt otherTeamPrompt :: Prompt
otherTeamPrompt = strPrompt "Other team: " $ otherTeamPrompt = strPrompt "Other team: " $
modify . (progMode . gameStateL . otherTeam .~) modify . (progMode.gameStateL.otherTeam .~)
-- | Prompts for the home score -- | Prompts for the home score
homeScorePrompt :: Prompt homeScorePrompt :: Prompt
homeScorePrompt = numPrompt "Home score: " $ homeScorePrompt = numPrompt "Home score: " $
modify . (progMode . gameStateL . homeScore ?~) modify . (progMode.gameStateL.homeScore ?~)
-- | Prompts for the away score -- | Prompts for the away score
awayScorePrompt :: Prompt awayScorePrompt :: Prompt
awayScorePrompt = numPrompt "Away score: " $ awayScorePrompt = numPrompt "Away score: " $
modify . (progMode . gameStateL . awayScore ?~) modify . (progMode.gameStateL.awayScore ?~)
drawSimplePrompt :: String -> ProgState -> C.Update () drawSimplePrompt :: String -> ProgState -> C.Update ()
drawSimplePrompt pStr s = C.drawString $ pStr ++ s ^. inputBuffer drawSimplePrompt pStr s = C.drawString $ pStr ++ s^.inputBuffer