implemented Mtlstats.Control.EditGoalie.editC

This commit is contained in:
Jonathan Lamothe 2019-11-11 20:38:20 -05:00
parent f9849023bc
commit 3dfbfe7090
2 changed files with 70 additions and 3 deletions

View File

@ -19,6 +19,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
-}
{-# LANGUAGE LambdaCase #-}
module Mtlstats.Control.EditGoalie (editGoalieC) where
import Lens.Micro ((^.))
@ -31,10 +33,70 @@ import Mtlstats.Types
editGoalieC :: EditGoalieState -> Controller
editGoalieC egs
| null $ egs^.egsSelectedGoalie = selectC
| otherwise = editC
| otherwise = editC $ egs^.egsMode
selectC :: Controller
selectC = promptController goalieToEditPrompt
editC :: Controller
editC = undefined
editC :: EditGoalieMode -> Controller
editC = \case
EGMenu -> menuC
EGNumber -> numberC
EGName -> nameC
EGYtdGames -> ytdGamesC
EGYtdMins -> ytdMinsC
EGYtdGoals -> ytdGoalsC
EGYtdWins -> ytdWinsC
EGYtdLosses -> ytdLossesC
EGYtdTies -> ytdTiesC
EGLtGames -> ltGamesC
EGLtMins -> ltMinsC
EGLtGoals -> ltGoalsC
EGLtWins -> ltWinsC
EGLtLosses -> ltLossesC
EGLtTies -> ltTiesC
menuC :: Controller
menuC = undefined
numberC :: Controller
numberC = undefined
nameC :: Controller
nameC = undefined
ytdGamesC :: Controller
ytdGamesC = undefined
ytdMinsC :: Controller
ytdMinsC = undefined
ytdGoalsC :: Controller
ytdGoalsC = undefined
ytdWinsC :: Controller
ytdWinsC = undefined
ytdLossesC :: Controller
ytdLossesC = undefined
ytdTiesC :: Controller
ytdTiesC = undefined
ltGamesC :: Controller
ltGamesC = undefined
ltMinsC :: Controller
ltMinsC = undefined
ltGoalsC :: Controller
ltGoalsC = undefined
ltWinsC :: Controller
ltWinsC = undefined
ltLossesC :: Controller
ltLossesC = undefined
ltTiesC :: Controller
ltTiesC = undefined

View File

@ -30,6 +30,7 @@ module Mtlstats.Menu (
gameMonthMenu,
gameTypeMenu,
editPlayerMenu,
editGoalieMenu,
gameGoalieMenu
) where
@ -158,6 +159,10 @@ editPlayerMenu = Menu "*** EDIT PLAYER ***" () $ map
, ( '0', "Finished editing", Nothing )
]
-- | The 'Goalie' edit menu
editGoalieMenu :: Menu ()
editGoalieMenu = undefined
-- | Game goalie selection menu
gameGoalieMenu :: ProgState -> Menu ()
gameGoalieMenu s = let