Fix dependency loop

This commit is contained in:
Tibo De Peuter 2022-12-22 13:31:46 +01:00
parent b7278d6afc
commit f529fc5237
25 changed files with 251 additions and 199 deletions

View file

@ -1,16 +1,17 @@
module RPGEngine.Input.Paused
module RPGEngine.Input.Paused
( handleInputPaused
) where
import RPGEngine.Input.Core ( InputHandler, handleAnyKey )
import RPGEngine.Data ( Game (..), State (..) )
import RPGEngine.Input.Core (InputHandler, handleAnyKey)
import RPGEngine.Data (Game (..), State (continue, Paused))
------------------------------ Exported ------------------------------
handleInputPaused :: InputHandler Game
handleInputPaused = handleAnyKey continueGame
----------------------------------------------------------------------
continueGame :: Game -> Game
continueGame g@Game{ state = Paused{ continue = state }} = newGame
where newGame = g{ state = state }