fix bug
This commit is contained in:
parent
5a2329fa0b
commit
3ffdfc10a5
2 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
[project]
|
[project]
|
||||||
name = "hanabi"
|
name = "hanabi"
|
||||||
version = "1.1.3"
|
version = "1.1.4"
|
||||||
description = "Hanabi interface"
|
description = "Hanabi interface"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
|
|
|
@ -3,7 +3,7 @@ from typing import List, Dict, Tuple
|
||||||
from hanab_game import Action, ParseError
|
from hanab_game import Action, ParseError
|
||||||
from hanabi import hanab_game
|
from hanabi import hanab_game
|
||||||
from hanabi import constants
|
from hanabi import constants
|
||||||
from hanabi.live import variants, compress
|
from hanabi.live import variants
|
||||||
|
|
||||||
|
|
||||||
class HanabLiveInstance(hanab_game.HanabiInstance):
|
class HanabLiveInstance(hanab_game.HanabiInstance):
|
||||||
|
@ -91,8 +91,8 @@ class HanabLiveGameState(hanab_game.GameState):
|
||||||
|
|
||||||
def to_json(self):
|
def to_json(self):
|
||||||
return {
|
return {
|
||||||
"actions": compress.compress_actions(self.actions),
|
"actions": [action.to_json() for action in self.actions],
|
||||||
"deck": compress.compress_deck(self.deck),
|
"deck": [card.to_json() for card in self.deck],
|
||||||
"players": ["Alice", "Bob", "Cathy", "Donald", "Emily", "Frank"][:self.num_players],
|
"players": ["Alice", "Bob", "Cathy", "Donald", "Emily", "Frank"][:self.num_players],
|
||||||
"notes": [[]] * self.num_players,
|
"notes": [[]] * self.num_players,
|
||||||
"options": {
|
"options": {
|
||||||
|
|
Loading…
Reference in a new issue