Initial implementation of bezier bullet

This commit is contained in:
2021-03-15 13:11:01 +01:00
parent 5ce9b4487b
commit a5e0dc65da
6 changed files with 43 additions and 349 deletions
+5
View File
@@ -35,6 +35,11 @@ midPadL :: Int -> a -> [a] -> [a] -> [a]
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
(xs,[]) -> xs
(xs,(y:_)) -> xs ++ [y]
you :: World -> Creature
you w = _creatures w IM.! _yourID w