瀏覽代碼

add askgame query json instance

master
flavis 6 年之前
父節點
當前提交
9eb443638a
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. +2
    -0
      src/Skat/AI/Online.hs

+ 2
- 0
src/Skat/AI/Online.hs 查看文件

@@ -167,6 +167,8 @@ instance ToJSON Query where
object ["query" .= ("skat" :: String), "cards" .= cards, "bid" .= bid ]
toJSON (CardsQuery cards) =
object ["query" .= ("cards" :: String), "cards" .= cards ]
toJSON (AskGameQuery bid) =
object ["query" .= ("ask_game" :: String), "bid" .= bid]

instance FromJSON ChosenResponse where
parseJSON = withObject "ChosenResponse" $ \v -> ChosenResponse


Loading…
取消
儲存