From 0519635a27748c117acebb69f43ba3d495779a58 Mon Sep 17 00:00:00 2001 From: jgk Date: Mon, 15 Mar 2021 14:11:35 +0100 Subject: [PATCH] Implement collisions for bez bullets, creates infinite loop sometimes --- src/Dodge/Base.hs | 2 +- src/Picture.hs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Dodge/Base.hs b/src/Dodge/Base.hs index 259ba9fef..5b9a67cb1 100644 --- a/src/Dodge/Base.hs +++ b/src/Dodge/Base.hs @@ -36,7 +36,7 @@ midPadL i x xs ys = take j (xs ++ repeat x) ++ ys where j = i - length ys takeUntil :: (a -> Bool) -> [a] -> [a] -takeUntil f ps = case span f ps of +takeUntil f ps = case span (not . f) ps of (xs,[]) -> xs (xs,(y:_)) -> xs ++ [y] diff --git a/src/Picture.hs b/src/Picture.hs index d4c148bb2..373703619 100644 --- a/src/Picture.hs +++ b/src/Picture.hs @@ -9,6 +9,7 @@ module Picture , arcSolid , thickArc , thickCircle + , thickLine , circleSolid , circleSolidCol , circle