Don't walk gormlaks into walls

Because of the way lines are drawn, a specific configuration of
positioning for gormlaks would have them decide they desperately wanted
to walk *inside* a wall, which they would then both fail to do but also
always collide with whenever they tried to go anywhere else.
This commit is contained in:
Griffin Smith 2019-10-15 22:54:31 -04:00
parent 8a4220df83
commit 4882350f5d
3 changed files with 31 additions and 12 deletions

View file

@ -21,4 +21,8 @@ test = testGroup "Xanthous.Util"
forAll (shuffle xs) $ \shuffledXs ->
smallestNotIn xs === smallestNotIn shuffledXs
]
, testGroup "takeWhileInclusive"
[ testProperty "takeWhileInclusive (const True) ≡ id"
$ \(xs :: [Int]) -> takeWhileInclusive (const True) xs === xs
]
]