Refactor, try to limit dependencies
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
module Dodge.PressPlate
|
||||
where
|
||||
import Dodge.Data
|
||||
import Geometry
|
||||
module Dodge.PressPlate where
|
||||
|
||||
import Dodge.Base.You
|
||||
import Dodge.Data.World
|
||||
import Dodge.WorldEvent.Explosion
|
||||
import Geometry
|
||||
|
||||
doPressPlateEvent :: PressPlateEvent -> PressPlate -> World -> World
|
||||
doPressPlateEvent ppe = case ppe of
|
||||
PressPlateId -> const id
|
||||
PressPlateId -> const id
|
||||
PPLevelReset -> ppLevelReset
|
||||
|
||||
ppLevelReset :: PressPlate -> World -> World
|
||||
ppLevelReset pp w
|
||||
| dist (_crPos $ you w) (_ppPos pp) < 20 = makeExplosionAt (_ppPos pp) w
|
||||
| dist (_crPos $ you w) (_ppPos pp) < 20 = makeExplosionAt (_ppPos pp) w
|
||||
| otherwise = w
|
||||
|
||||
|
||||
Reference in New Issue
Block a user