Move sparks into dedicated datatype

This commit is contained in:
2022-07-18 12:15:05 +01:00
parent 13f2255ba7
commit 5495d33389
16 changed files with 99 additions and 104 deletions
+1 -2
View File
@@ -28,8 +28,7 @@ moveTeslaArc thearc w pt
where
rcol = brightX 100 1.5 <$> takeOne [white,azure,blue,cyan]
rdir = state (randomR (-0.7,0.7)) <&> (+ ld)
rtime = state $ randomR (5,8)
makeaspark = randColDirTimeSpark rcol rdir rtime lp
makeaspark = randColDirTimeSpark rcol rdir lp
makesparks = makeaspark . makeaspark . makeaspark
(lp,ld) = case last thearc of
ArcStep lp' ld' Nothing -> (lp',ld')