Start to refactor terminals

This commit is contained in:
2024-11-05 21:14:53 +00:00
parent 79b03ef6ec
commit 7e1b5f0921
12 changed files with 335 additions and 341 deletions
-10
View File
@@ -246,16 +246,6 @@ isConnected x = case x ^. locLdtContext of
|| not (null $ x ^. locLDT . ldtLeft)
_ -> True
isConnectedAbove :: LocationLDT b a -> Bool
isConnectedAbove x = case x ^. locLdtContext of
LeftwardLDT {} -> True
_ -> not . null $ x ^. locLDT . ldtRight
isConnectedBelow :: LocationLDT b a -> Bool
isConnectedBelow x = case x ^. locLdtContext of
RightwardLDT {} -> True
_ -> not . null $ x ^. locLDT . ldtLeft
changeSwapWith :: (Int -> IM.IntMap (SelectionItem ()) -> Maybe Int) -> World -> World
changeSwapWith f w = case w ^? hud . hudElement . diSelection . _Just of
Just (0, i) -> w & swapInvItems f i