Merge pull request #16 from mtlstats/refactor
removed cpsConfirmed from CreatePlayerStatus
This commit is contained in:
commit
db0084f991
|
@ -57,8 +57,7 @@ dispatch s = case s^.progMode of
|
||||||
| null $ cps^.cpsNumber -> getPlayerNumC
|
| null $ cps^.cpsNumber -> getPlayerNumC
|
||||||
| null $ cps^.cpsName -> getPlayerNameC
|
| null $ cps^.cpsName -> getPlayerNameC
|
||||||
| null $ cps^.cpsPosition -> getPlayerPosC
|
| null $ cps^.cpsPosition -> getPlayerPosC
|
||||||
| not $ cps^.cpsConfirmed -> confirmCreatePlayerC
|
| otherwise -> confirmCreatePlayerC
|
||||||
| otherwise -> undefined
|
|
||||||
|
|
||||||
mainMenuC :: Controller
|
mainMenuC :: Controller
|
||||||
mainMenuC = Controller
|
mainMenuC = Controller
|
||||||
|
|
|
@ -59,7 +59,6 @@ module Mtlstats.Types (
|
||||||
cpsNumber,
|
cpsNumber,
|
||||||
cpsName,
|
cpsName,
|
||||||
cpsPosition,
|
cpsPosition,
|
||||||
cpsConfirmed,
|
|
||||||
-- ** Database Lenses
|
-- ** Database Lenses
|
||||||
dbPlayers,
|
dbPlayers,
|
||||||
dbGoalies,
|
dbGoalies,
|
||||||
|
@ -204,8 +203,6 @@ data CreatePlayerState = CreatePlayerState
|
||||||
-- ^ The player's name
|
-- ^ The player's name
|
||||||
, _cpsPosition :: String
|
, _cpsPosition :: String
|
||||||
-- ^ The player's position
|
-- ^ The player's position
|
||||||
, _cpsConfirmed :: Bool
|
|
||||||
-- ^ Set when the user confirms the input
|
|
||||||
} deriving (Eq, Show)
|
} deriving (Eq, Show)
|
||||||
|
|
||||||
-- | Represents the database
|
-- | Represents the database
|
||||||
|
@ -479,7 +476,6 @@ newCreatePlayerState = CreatePlayerState
|
||||||
{ _cpsNumber = Nothing
|
{ _cpsNumber = Nothing
|
||||||
, _cpsName = ""
|
, _cpsName = ""
|
||||||
, _cpsPosition = ""
|
, _cpsPosition = ""
|
||||||
, _cpsConfirmed = False
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- | Constructor for a 'Database'
|
-- | Constructor for a 'Database'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user