Implement slime splitting

This commit is contained in:
2026-04-11 23:53:54 +01:00
parent 5052ee7a9e
commit 6f2e862c65
4 changed files with 122 additions and 76 deletions
+6 -1
View File
@@ -22,7 +22,12 @@ cardVec = \case
West -> V2 (-1) 0
vecCard :: Point2 -> CardinalPoint
vecCard (V2 x y) = undefined
vecCard 0 = error "vecCard null"
vecCard (V2 x y)
| x > abs y = East
| -x > abs y = West
| y > 0 = North
| otherwise = South
card8Vec :: Cardinal8 -> Point2
card8Vec cp = case cp of