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
+5 -14
View File
@@ -1,4 +1,3 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
@@ -6,8 +5,8 @@ module Dodge.Data.ArcStep where
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Dodge.Data.CrWlID
import GHC.Generics
import Geometry.Data
data ArcStep = ArcStep
@@ -15,21 +14,13 @@ data ArcStep = ArcStep
, _asDir :: Float
, _asObject :: CrWlID --Maybe (Either Creature Wall)
}
deriving (Eq, Ord, Show, Read, Generic)
instance ToJSON ArcStep where
toEncoding = genericToEncoding defaultOptions
instance FromJSON ArcStep
deriving (Eq, Ord, Show, Read)
data NextArcStep
= EndArc
| DefaultArcStep
deriving (Eq, Ord, Show, Read, Generic)
instance ToJSON NextArcStep where
toEncoding = genericToEncoding defaultOptions
instance FromJSON NextArcStep
deriving (Eq, Ord, Show, Read)
makeLenses ''ArcStep
deriveJSON defaultOptions ''ArcStep
deriveJSON defaultOptions ''NextArcStep