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
+14 -15
View File
@@ -1,27 +1,26 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Corpse where
import GHC.Generics
import Data.Aeson
import ShapePicture.Data
import Geometry.Data
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Geometry.Data
import ShapePicture.Data
data CorpseResurrection = NoResurrection
deriving (Eq,Ord,Show,Read,Generic)
instance ToJSON CorpseResurrection where
toEncoding = genericToEncoding defaultOptions
instance FromJSON CorpseResurrection
deriving (Eq, Ord, Show, Read)
data Corpse = Corpse
{ _cpID :: Int
{ _cpID :: Int
, _cpPos :: Point2
, _cpDir :: Float
, _cpSPic :: SPic
, _cpRes :: CorpseResurrection
}
deriving (Eq,Ord,Show,Read,Generic)
instance ToJSON Corpse where
toEncoding = genericToEncoding defaultOptions
instance FromJSON Corpse
deriving (Eq, Ord, Show, Read)
makeLenses ''Corpse
deriveJSON defaultOptions ''CorpseResurrection
deriveJSON defaultOptions ''Corpse