Skip to content

Commit

Permalink
ADD: next rubber method
Browse files Browse the repository at this point in the history
Signed-off-by: Segelzwerg <25705862+Segelzwerg@users.noreply.github.com>
  • Loading branch information
Segelzwerg committed Oct 26, 2022
1 parent 66e5426 commit 8082c09
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion whist_core/session/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,16 @@ def current_rubber(self) -> Rubber:
raise TableNotStartedError()
return self.rubbers[-1]

def start(self, matcher: Matcher) -> None:
def next_rubber(self) -> Rubber:
"""
Creates the next rubber.
:return: the new rubber
"""
if len(self.rubbers) == 0 or self.rubbers[-1].done:
self.rubbers.append(self._create_rubber())
return self.current_rubber

def start(self) -> None:
"""
Starts the table, but will check if every player is ready first.
"""
Expand Down

0 comments on commit 8082c09

Please sign in to comment.