26 lines
673 B
Haskell
26 lines
673 B
Haskell
{-# LANGUAGE DeriveGeneric #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
{-# LANGUAGE StrictData #-}
|
|
{- | GameRooms contain information about given positions in the world
|
|
-}
|
|
module Dodge.GameRoom
|
|
where
|
|
import Geometry
|
|
import Control.Lens
|
|
import GHC.Generics
|
|
import Data.Aeson
|
|
|
|
data GameRoom = GameRoom
|
|
{ _grViewpoints :: [Point2]
|
|
, _grViewpointsEx :: [Point2]
|
|
, _grBound :: [Point2]
|
|
, _grDir :: Float -- ^ gives direction of room
|
|
, _grLinkDirs :: [Float]
|
|
, _grName :: String
|
|
}
|
|
deriving (Eq,Ord,Show,Read,Generic)
|
|
instance ToJSON GameRoom where
|
|
toEncoding = genericToEncoding defaultOptions
|
|
instance FromJSON GameRoom
|
|
makeLenses ''GameRoom
|