Recover character hitpoints over time

Wrap hitpoints in a newtype, and recover character hitpoints over time
This commit is contained in:
Griffin Smith 2019-11-15 21:20:01 -05:00
parent 87fedcb6c9
commit 7b90b02049
6 changed files with 44 additions and 18 deletions

View file

@ -96,7 +96,7 @@ drawCharacterInfo ch = txt " " <+> charName <+> charHitpoints
= emptyWidget
charHitpoints
= txt "Hitpoints: "
<+> txt (tshow $ ch ^. characterHitpoints)
<+> txt (tshow $ let Hitpoints hp = characterHitpoints ch in hp)
drawGame :: GameState -> [Widget Name]
drawGame game