From 2330f10e9ee28cd6389fccf5f01467bedf6c0266 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 11 Mar 2023 22:14:27 +0000 Subject: Add the exit it is drawn before any other entity --- src/Game/Entities.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Game/Entities.hs b/src/Game/Entities.hs index bd9729b..b53e4e3 100644 --- a/src/Game/Entities.hs +++ b/src/Game/Entities.hs @@ -56,7 +56,7 @@ playerPosition (Entities _ _ entities) = addExit :: Entities -> Int -> Int -> IO Entities addExit es x y = do exit <- mkExit es.sprites x y (collision es.player 24) - pure es {entities = es.entities ++ [exit]} + pure es {entities = head es.entities : exit : tail es.entities} updateAll :: Entities -> GS.State -> IO (Entities, GS.State) updateAll es state = do -- cgit v1.2.3