Commit before removing "un-input-able" terminals

This commit is contained in:
2022-06-06 18:33:44 +01:00
parent 4e181b8273
commit b20502bc35
6 changed files with 77 additions and 56 deletions
+3 -8
View File
@@ -41,19 +41,14 @@ import Data.Maybe
--import System.Random
analyser
:: [String] -- | initial text
-> String -- | succeed text
-> String -- | fail text
-> [String] -- | after text
-> (Machine -> World -> World)
:: (Machine -> World -> World)
-> PlacementSpot
-> PlacementSpot
-> Placement
analyser starts sucs _ afters upf pslight psmc = extTrigLitPos pslight $ \tp ->
analyser upf pslight psmc = extTrigLitPos pslight $ \tp ->
Just $ plSpot .~ psmc $ putTerminal' aquamarine tparams (termupdate tp)
where
tparams = defaultTermParams & tmFutureLines ++.~
(map makeTermLine starts ++ [makeTermLine sucs] ++ map makeTermLine afters)
tparams = defaultTermParams & tmScrollCommands .:~ sensorCommand
termupdate tp _ mc = upf mc . (triggers . ix (fromJust $ _plMID tp) .~ const (_sensToggle $ _mcSensor mc))
analyserTest :: (World -> Bool) -> Machine -> World -> World