hanabi.py: support adding arbitrary clues for nicer replays
This commit is contained in:
parent
9fe456f0f9
commit
87524addd6
1 changed files with 5 additions and 1 deletions
|
@ -188,7 +188,11 @@ class GameState():
|
|||
def make_action(self, action):
|
||||
match action.type:
|
||||
case ActionType.ColorClue | ActionType.RankClue:
|
||||
self.clue()
|
||||
assert(self.clues > 0)
|
||||
self.actions.append(action)
|
||||
self.clues -= 1
|
||||
self.__make_turn()
|
||||
# TODO: could check that the clue specified is in fact legal
|
||||
case ActionType.Play:
|
||||
self.play(action.target)
|
||||
case ActionType.Discard:
|
||||
|
|
Loading…
Reference in a new issue