aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-02-25 23:11:50 +0000
committerJuan J. Martinez <jjm@usebox.net>2023-02-25 23:11:50 +0000
commitc5b11b2c3acfd701fe5689bf0666a9adcbde8e4e (patch)
tree3cc2680c92d3b4b2d53afa19009d8fdc2fb01241
parent134d1103a1fb0fd4916afb457381e7b1eae01857 (diff)
downloadspace-plat-hs-c5b11b2c3acfd701fe5689bf0666a9adcbde8e4e.tar.gz
space-plat-hs-c5b11b2c3acfd701fe5689bf0666a9adcbde8e4e.zip
Use void
-rw-r--r--src/Game/Entities.hs4
1 files changed, 2 insertions, 2 deletions
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