Split Dodge.Base

This commit is contained in:
2022-06-19 11:34:59 +01:00
parent 6cc29813d8
commit df1f3ad6b0
15 changed files with 106 additions and 88 deletions
+27
View File
@@ -0,0 +1,27 @@
module Dodge.Base.Item
(
) where
--import Dodge.Data
--import Dodge.Base.You
--import LensHelp
--
--import qualified Data.IntMap.Strict as IM
--selectedObject :: World -> Maybe (Either FloorItem Button)
--selectedObject w = lookup (_crInvSel ycr) $ zip [n..] $ _closeObjects w
-- where
-- ycr = you w
-- n = length $ _crInv ycr
--
--crItem :: World -> Int -> Item
--crItem w cid = _crInv cr IM.! _crInvSel cr
-- where
-- cr = _creatures w IM.! cid
--
--yourItemRef
-- :: Applicative f
-- => World
-- -> (Item -> f Item)
-- -> World
-- -> f World
--yourItemRef w = creatures . ix (_yourID w) . crInv . ix (_crInvSel (you w))