Y2N6GDITBJID3Q4Z2Y7KEDY46F7R3SU4DRK3ST6ZMA4CNLXWSFDAC module Main whereimport Noveimport Nove.Verse
| me u = me'| Robot {} <- u = u { ops = drop 1 $ ops u }| Box {} <- u = u { pushed = push }| Ball {} <- u , Nothing <- pushed u = u { pushed = push }| Ball {} <- u , Just _ <- push = u { pushed = push }| Ball {} <- u = u { pushed = Nothing }| otherwise = u
| me u = me'| Robot {} <- u = u { ops = drop 1 $ ops u }| Box {} <- u = u { pushed = push }| Ball {} <- u , Nothing <- pushed u = u { pushed = push }| Ball {} <- u , Just _ <- push = u { pushed = push }| Ball {} <- u = u { pushed = Nothing }| otherwise = u
-- come = catMaybes $ f <$> total-- where-- f dir-- | n <- node v $ shift v 1 dir i , Just d <- move n , dir == opposite d = Just n-- | otherwise = Nothing