1
0
Fork 0

Bootstrapped my haskell client

This commit is contained in:
Julien Dessaux 2023-07-02 22:58:30 +02:00
parent 36cc33f9e9
commit a775330b4f
Signed by: adyxax
GPG key ID: F92E51B86E07177E
12 changed files with 389 additions and 2 deletions

View file

@ -0,0 +1,22 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module SpaceTraders.Model.Agent
( Agent(accountId, credits, headquarters)
, agentSymbol
) where
import Data.Aeson
import GHC.Generics
import qualified Data.Text as T
data Agent = Agent { accountId :: T.Text
, credits :: Integer
, headquarters :: T.Text
, startingFaction :: T.Text
, symbol :: T.Text
} deriving (FromJSON, Generic, Show, ToJSON)
agentSymbol :: Agent -> T.Text
agentSymbol = symbol