This repository has been archived on 2023-06-24. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2022FuncProg-project3-RPGEn.../lib/RPGEngine/Input/Lose.hs

17 lines
No EOL
470 B
Haskell

module RPGEngine.Input.Lose
( handleInputLose
) where
import RPGEngine.Input.Core (InputHandler, handleAnyKey)
import RPGEngine.Data (Game(..), State(..))
------------------------------ Exported ------------------------------
handleInputLose :: InputHandler Game
handleInputLose = handleAnyKey retry
----------------------------------------------------------------------
retry :: Game -> Game
retry g@Game{ state = Lose{ restart = restart }} = g{ state = restart }