Move from store to flat
This commit is contained in:
+20
-14
@@ -1,29 +1,35 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{- | GameRooms contain information about given positions in the world
|
||||
-}
|
||||
module Dodge.GameRoom
|
||||
where
|
||||
import LinearHelp
|
||||
import Geometry
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
-- | GameRooms contain information about given positions in the world
|
||||
module Dodge.GameRoom where
|
||||
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import GHC.Generics
|
||||
import Data.Aeson
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import GHC.Generics
|
||||
import Geometry
|
||||
import LinearHelp
|
||||
import TH.Derive
|
||||
|
||||
data GameRoom = GameRoom
|
||||
{ _grViewpoints :: [Point2]
|
||||
, _grViewpointsEx :: [Point2]
|
||||
, _grBound :: [Point2]
|
||||
, _grDir :: Float -- ^ gives direction of room
|
||||
, -- | gives direction of room
|
||||
_grDir :: Float
|
||||
, _grLinkDirs :: [Float]
|
||||
, _grName :: String
|
||||
}
|
||||
deriving (Eq,Ord,Show,Read,Generic)
|
||||
instance ToJSON GameRoom where
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
instance ToJSON GameRoom where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
instance FromJSON GameRoom
|
||||
|
||||
instance FromJSON GameRoom
|
||||
|
||||
makeLenses ''GameRoom
|
||||
$($(derive [d| instance Deriving (Store GameRoom) |]))
|
||||
|
||||
Reference in New Issue
Block a user