better return type

This commit is contained in:
Maximilian Keßler 2023-08-08 14:06:44 +02:00
parent 3ffdfc10a5
commit 511c3bc7c6
Signed by: max
GPG Key ID: BCC5A619923C0BA5
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[project]
name = "hanabi"
version = "1.1.4"
version = "1.1.5"
description = "Hanabi interface"
readme = "README.md"
license = { file = "LICENSE" }

View File

@ -177,7 +177,7 @@ def compress_game_state(state: Union[hanab_game.GameState, hanab_live.HanabLiveG
return with_dashes
def decompress_game_state(game_str: str) -> hanab_game.GameState:
def decompress_game_state(game_str: str) -> hanab_live.HanabLiveGameState:
game_str = game_str.replace("-", "")
parts = game_str.split(",")
if not len(parts) == 3:
@ -211,8 +211,8 @@ def decompress_game_state(game_str: str) -> hanab_game.GameState:
except ValueError:
raise ValueError("Expected variant id, found: {}".format(variant_id))
instance = hanab_game.HanabiInstance(deck, num_players)
game = hanab_game.GameState(instance)
instance = hanab_live.HanabLiveInstance(deck, num_players, variant_id)
game = hanab_live.HanabLiveGameState(instance)
# TODO: game is not in consistent state
game.actions = actions