From 0c2974b055eba18142b0fa25b1714c0a38d78a06 Mon Sep 17 00:00:00 2001 From: Tissevert Date: Thu, 17 Oct 2019 12:13:15 +0200 Subject: [PATCH] Add needed JSON instances for PrivateState --- src/Hanafuda/Message.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Hanafuda/Message.hs b/src/Hanafuda/Message.hs index bcc6183..c95114a 100644 --- a/src/Hanafuda/Message.hs +++ b/src/Hanafuda/Message.hs @@ -150,6 +150,10 @@ data PrivateState = PrivateState { , deck :: [Hanafuda.Card] } deriving Generic +instance FromJSON PrivateState +instance ToJSON PrivateState where + toEncoding = genericToEncoding defaultOptions + data PublicPlayer = PublicPlayer { meld :: Hanafuda.Pack , yakus :: KoiKoi.Score