Created
November 25, 2016 00:30
-
-
Save lordcirth/3c2d9a0ad60dc0ee786db2654183b0c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- run a full game turn, ie pre-turn, player turn, enemy turn, post-turn. | |
-- Currently, only the player exists. | |
fullGameTurn :: (Action) -> GameState -> GameState | |
fullGameTurn action gs | |
-- Player hasn't spent turn - free action or invalid | |
| not (result^.costsTurn) = result^.gameState | |
-- Player has spent turn - normal action completed | |
-- TODO: this is where to run enemy turns, etc | |
| result^.costsTurn = result^.gameState | |
where result = playerTurn action gs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment