prompt for game year

This commit is contained in:
Jonathan Lamothe
2019-08-31 11:28:09 -04:00
parent f718757bea
commit 0798786d36
3 changed files with 10 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ module Mtlstats.Prompt (
strPrompt,
numPrompt,
-- * Individual prompts
gameYearPrompt,
otherTeamPrompt,
homeScorePrompt,
awayScorePrompt
@@ -93,6 +94,11 @@ numPrompt pStr act = Prompt
, promptFunctionKey = const $ return ()
}
-- | Prompts for the game year
gameYearPrompt :: Prompt
gameYearPrompt = numPrompt "Game year: " $
modify . (progMode.gameStateL.gameYear ?~)
-- | Prompts for the other team name
otherTeamPrompt :: Prompt
otherTeamPrompt = strPrompt "Other team: " $