Add GameIDs to PublicGame
This commit is contained in:
parent
b62dc4ff28
commit
c6352a9669
1 changed files with 3 additions and 2 deletions
|
@ -31,7 +31,7 @@ import Data.Text.Encoding (decodeUtf8, encodeUtf8)
|
||||||
import GHC.Generics (Generic)
|
import GHC.Generics (Generic)
|
||||||
import qualified Hanafuda (Card(..), Flower(..), Pack, cardsOfPack, empty, packOfCards)
|
import qualified Hanafuda (Card(..), Flower(..), Pack, cardsOfPack, empty, packOfCards)
|
||||||
import Hanafuda.ID (ID(..), IDType(..), Prefix(..))
|
import Hanafuda.ID (ID(..), IDType(..), Prefix(..))
|
||||||
import Hanafuda.KoiKoi (PlayerID)
|
import Hanafuda.KoiKoi (GameID, PlayerID)
|
||||||
import qualified Hanafuda.KoiKoi as KoiKoi (
|
import qualified Hanafuda.KoiKoi as KoiKoi (
|
||||||
Action(..), Game(..), Mode(..), Move(..), Player(..), Players(..), PlayerTurn
|
Action(..), Game(..), Mode(..), Move(..), Player(..), Players(..), PlayerTurn
|
||||||
, Score, Scores, Source(..), Step(..), Yaku(..)
|
, Score, Scores, Source(..), Step(..), Yaku(..)
|
||||||
|
@ -181,7 +181,8 @@ instance ToJSON ByteString where
|
||||||
toEncoding = toEncoding . decodeUtf8 . B64.encode
|
toEncoding = toEncoding . decodeUtf8 . B64.encode
|
||||||
|
|
||||||
data PublicGame = PublicGame {
|
data PublicGame = PublicGame {
|
||||||
nonce :: ByteString
|
gameID :: GameID
|
||||||
|
, nonce :: ByteString
|
||||||
, playerHand :: Hanafuda.Pack
|
, playerHand :: Hanafuda.Pack
|
||||||
, private :: ByteString
|
, private :: ByteString
|
||||||
, public :: PublicState
|
, public :: PublicState
|
||||||
|
|
Loading…
Reference in a new issue