added create player option to main menu

This commit is contained in:
Jonathan Lamothe
2019-09-09 10:51:32 -04:00
parent 6b73e367e4
commit d5d08aa0f7
5 changed files with 17 additions and 1 deletions

View File

@@ -39,6 +39,7 @@ spec = describe "Mtlstats.Actions" $ do
overtimeCheckSpec
updateGameStatsSpec
validateGameDateSpec
createPlayerSpec
startNewSeasonSpec :: Spec
startNewSeasonSpec = describe "startNewSeason" $ do
@@ -315,6 +316,12 @@ validateGameDateSpec = describe "validateGameDate" $ do
s^.progMode.gameStateL.gameMonth `shouldBe` Just 6
s^.progMode.gameStateL.gameDay `shouldBe` Nothing
createPlayerSpec :: Spec
createPlayerSpec = describe "createPlayer" $
it "should change the mode appropriately" $ let
s = createPlayer newProgState
in s^.progMode `shouldBe` CreatePlayer newCreatePlayerState
makePlayer :: IO Player
makePlayer = Player
<$> makeNum