Merge pull request #16 from mtlstats/refactor

removed cpsConfirmed from CreatePlayerStatus
This commit is contained in:
Jonathan Lamothe 2019-09-10 16:22:40 -04:00 committed by GitHub
commit db0084f991
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

View File

@ -57,8 +57,7 @@ dispatch s = case s^.progMode of
| null $ cps^.cpsNumber -> getPlayerNumC
| null $ cps^.cpsName -> getPlayerNameC
| null $ cps^.cpsPosition -> getPlayerPosC
| not $ cps^.cpsConfirmed -> confirmCreatePlayerC
| otherwise -> undefined
| otherwise -> confirmCreatePlayerC
mainMenuC :: Controller
mainMenuC = Controller

View File

@ -59,7 +59,6 @@ module Mtlstats.Types (
cpsNumber,
cpsName,
cpsPosition,
cpsConfirmed,
-- ** Database Lenses
dbPlayers,
dbGoalies,
@ -204,8 +203,6 @@ data CreatePlayerState = CreatePlayerState
-- ^ The player's name
, _cpsPosition :: String
-- ^ The player's position
, _cpsConfirmed :: Bool
-- ^ Set when the user confirms the input
} deriving (Eq, Show)
-- | Represents the database
@ -479,7 +476,6 @@ newCreatePlayerState = CreatePlayerState
{ _cpsNumber = Nothing
, _cpsName = ""
, _cpsPosition = ""
, _cpsConfirmed = False
}
-- | Constructor for a 'Database'