HanabGame: add option to terminate game with action
This commit is contained in:
parent
dd131259c3
commit
331272cca2
1 changed files with 5 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue