Add GameIDs to PublicGame

This commit is contained in:
Tissevert 2019-12-27 17:55:14 +01:00
parent b62dc4ff28
commit c6352a9669

View file

@ -31,7 +31,7 @@ import Data.Text.Encoding (decodeUtf8, encodeUtf8)
import GHC.Generics (Generic)
import qualified Hanafuda (Card(..), Flower(..), Pack, cardsOfPack, empty, packOfCards)
import Hanafuda.ID (ID(..), IDType(..), Prefix(..))
import Hanafuda.KoiKoi (PlayerID)
import Hanafuda.KoiKoi (GameID, PlayerID)
import qualified Hanafuda.KoiKoi as KoiKoi (
Action(..), Game(..), Mode(..), Move(..), Player(..), Players(..), PlayerTurn
, Score, Scores, Source(..), Step(..), Yaku(..)
@ -181,7 +181,8 @@ instance ToJSON ByteString where
toEncoding = toEncoding . decodeUtf8 . B64.encode
data PublicGame = PublicGame {
nonce :: ByteString
gameID :: GameID
, nonce :: ByteString
, playerHand :: Hanafuda.Pack
, private :: ByteString
, public :: PublicState