HanabGame: add option to terminate game with action

This commit is contained in:
Maximilian Keßler 2024-10-09 17:47:19 +02:00
parent dd131259c3
commit 331272cca2

View file

@ -267,8 +267,13 @@ class GameState:
case ActionType.Discard:
self.discard(action.target)
case ActionType.EndGame | ActionType.VoteTerminate:
self.actions.append(action)
self.over = True
def terminate(self):
action = Action(ActionType.EndGame, 0, 0)
self.make_action(action)
# Forward some properties of the underlying instance
@property
def num_players(self):