From c5b11b2c3acfd701fe5689bf0666a9adcbde8e4e Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 25 Feb 2023 23:11:50 +0000 Subject: Use void --- src/Game/Entities.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Game/Entities.hs b/src/Game/Entities.hs index d265ff5..71f9791 100644 --- a/src/Game/Entities.hs +++ b/src/Game/Entities.hs @@ -1,6 +1,6 @@ module Game.Entities (Entities, Entity, mkEntities, updateAll, render) where -import Control.Monad (when) +import Control.Monad import Data.Bits (Bits (..)) import Data.Foldable (find, traverse_) import Data.IORef @@ -42,7 +42,7 @@ updateAll :: Entities -> IO Entities updateAll es = do -- update the player first (including the reference) updatedPlayer <- player.update player - _ <- writeIORef es.player updatedPlayer + void $ writeIORef es.player updatedPlayer state <- readIORef es.state -- update hit delay if the player was hit let playerWasHit = state.hitDelay > 0 -- cgit v1.2.3