refactored new season menu

This commit is contained in:
Jonathan Lamothe
2019-08-21 01:15:26 -04:00
parent 7cffac245c
commit 943efe0599
3 changed files with 12 additions and 17 deletions

View File

@@ -24,7 +24,8 @@ module Mtlstats.Menu (
drawMenu,
menuHandler,
-- * Menus
mainMenu
mainMenu,
newSeasonMenu
) where
import Control.Monad.Trans.State (StateT, modify)
@@ -56,3 +57,11 @@ mainMenu = Menu "*** MAIN MENU ***" True
, MenuItem '3' "Exit" $
return False
]
newSeasonMenu :: Menu ()
newSeasonMenu = Menu "*** SEASON TYPE ***" ()
[ MenuItem '1' "Regular Season" $
modify $ resetYtd . startNewGame
, MenuItem '2' "Playoffs" $
modify startNewGame
]