Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+11 -10
View File
@@ -1,12 +1,13 @@
module Dodge.WdP2f
where
import Geometry.Vector
import Dodge.Data
import Geometry.Data
import Control.Lens
module Dodge.WdP2f where
doWdP2f :: WdP2f -> World -> (Point2,Float)
import Control.Lens
import Dodge.Data.World
import Geometry.Data
import Geometry.Vector
doWdP2f :: WdP2f -> World -> (Point2, Float)
doWdP2f x = case x of
WdP2f0 -> const (0,0)
WdP2fDoorPosition drid -> \w -> let Just (a,b) = w ^? cWorld . doors . ix drid . drPos
in (b, argV (a-.-b))
WdP2f0 -> const (0, 0)
WdP2fDoorPosition drid -> \w ->
let Just (a, b) = w ^? cWorld . doors . ix drid . drPos
in (b, argV (a -.- b))