prompt for game month

This commit is contained in:
Jonathan Lamothe
2019-08-31 12:27:34 -04:00
parent 79f8df50a0
commit bd0cffc56c
3 changed files with 25 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ module Mtlstats.Menu (
-- * Menus
mainMenu,
newSeasonMenu,
gameMonthMenu,
gameTypeMenu
) where
@@ -72,6 +73,26 @@ newSeasonMenu = Menu "*** SEASON TYPE ***" ()
modify startNewGame
]
-- | Requests the month in which the game took place
gameMonthMenu :: Menu ()
gameMonthMenu = Menu "Month:" () $ map
(\(ch, name, val) ->
MenuItem ch name $
modify $ progMode.gameStateL.gameMonth ?~ val)
[ ( 'A', "January", 1 )
, ( 'B', "February", 2 )
, ( 'C', "March", 3 )
, ( 'D', "April", 4 )
, ( 'E', "May", 5 )
, ( 'F', "June", 6 )
, ( 'G', "July", 7 )
, ( 'H', "August", 8 )
, ( 'I', "September", 9 )
, ( 'J', "October", 10 )
, ( 'K', "November", 11 )
, ( 'L', "December", 12 )
]
-- | The game type menu (home/away)
gameTypeMenu :: Menu ()
gameTypeMenu = Menu "*** GAME TYPE ***" ()