prompt for player's position

This commit is contained in:
Jonathan Lamothe
2019-09-09 22:57:36 -04:00
parent 57ac90038a
commit 0ee0451496
2 changed files with 18 additions and 3 deletions

View File

@@ -54,9 +54,10 @@ dispatch s = case s^.progMode of
| not $ gs^.dataVerified -> verifyDataC
| otherwise -> reportC
CreatePlayer cps
| null $ cps^.cpsNumber -> getPlayerNumC
| null $ cps^.cpsName -> getPlayerNameC
| otherwise -> undefined
| null $ cps^.cpsNumber -> getPlayerNumC
| null $ cps^.cpsName -> getPlayerNameC
| null $ cps^.cpsPosition -> getPlayerPosC
| otherwise -> undefined
mainMenuC :: Controller
mainMenuC = Controller
@@ -214,3 +215,11 @@ getPlayerNameC = Controller
promptHandler playerNamePrompt e
return True
}
getPlayerPosC :: Controller
getPlayerPosC = Controller
{ drawController = drawPrompt playerPosPrompt
, handleController = \e -> do
promptHandler playerPosPrompt e
return True
}