penalty minutes control framework
This commit is contained in:
parent
1810434716
commit
e1a48afc5c
|
@ -24,7 +24,7 @@ module Mtlstats.Control (dispatch) where
|
||||||
import Control.Monad (join, when)
|
import Control.Monad (join, when)
|
||||||
import Control.Monad.Trans.State (gets, modify)
|
import Control.Monad.Trans.State (gets, modify)
|
||||||
import Data.Char (toUpper)
|
import Data.Char (toUpper)
|
||||||
import Data.Maybe (fromJust)
|
import Data.Maybe (fromJust, isJust)
|
||||||
import Lens.Micro ((^.), (.~))
|
import Lens.Micro ((^.), (.~))
|
||||||
import Lens.Micro.Extras (view)
|
import Lens.Micro.Extras (view)
|
||||||
import qualified UI.NCurses as C
|
import qualified UI.NCurses as C
|
||||||
|
@ -55,6 +55,8 @@ dispatch s = case s^.progMode of
|
||||||
| null $ gs^.overtimeFlag -> overtimeFlagC
|
| null $ gs^.overtimeFlag -> overtimeFlagC
|
||||||
| not $ gs^.dataVerified -> verifyDataC
|
| not $ gs^.dataVerified -> verifyDataC
|
||||||
| fromJust (unaccountedPoints gs) -> goalInput gs
|
| fromJust (unaccountedPoints gs) -> goalInput gs
|
||||||
|
| isJust $ gs^.selectedPlayer -> getPMinsC
|
||||||
|
| not $ gs^.pMinsRecorded -> pMinPlayerC
|
||||||
| otherwise -> reportC
|
| otherwise -> reportC
|
||||||
CreatePlayer cps
|
CreatePlayer cps
|
||||||
| null $ cps^.cpsNumber -> getPlayerNumC
|
| null $ cps^.cpsNumber -> getPlayerNumC
|
||||||
|
@ -241,6 +243,12 @@ confirmGoalDataC = Controller
|
||||||
return True
|
return True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pMinPlayerC :: Controller
|
||||||
|
pMinPlayerC = undefined
|
||||||
|
|
||||||
|
getPMinsC :: Controller
|
||||||
|
getPMinsC = undefined
|
||||||
|
|
||||||
reportC :: Controller
|
reportC :: Controller
|
||||||
reportC = Controller
|
reportC = Controller
|
||||||
{ drawController = \s -> do
|
{ drawController = \s -> do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user