whist_core.game.errors

Errors in game phase

Exceptions

CardNotInHandError

Raised when a player tries to play a card, that is not in their hand.

HandDoneError

Raised when the next trick is requested, but current Hand is already done..

HandNotDoneError

Raised when the next hand is requested, but current is not done yet.

GameNotDoneError

Raised if next game is requested, but current is not done yet.

GameNotStartedError

Raised if a game has not be started.

NotPlayersTurnError

Raised when players tries to play although is not their turn.

NoTrumpSelectedError

Raised when no trump is selected for hand.

RubberNotDoneError

Raised if the current rubber is not done, but action requested requires it to be done.

TrickDoneError

Raised when the trick is already done.

Module Contents

exception whist_core.game.errors.CardNotInHandError

Bases: Exception

Raised when a player tries to play a card, that is not in their hand.

exception whist_core.game.errors.HandDoneError

Bases: Exception

Raised when the next trick is requested, but current Hand is already done..

exception whist_core.game.errors.HandNotDoneError

Bases: Exception

Raised when the next hand is requested, but current is not done yet.

exception whist_core.game.errors.GameNotDoneError

Bases: Exception

Raised if next game is requested, but current is not done yet.

exception whist_core.game.errors.GameNotStartedError

Bases: Exception

Raised if a game has not be started.

exception whist_core.game.errors.NotPlayersTurnError(player, turn_player)

Bases: Exception

Raised when players tries to play although is not their turn.

Parameters:
message = 'Is not Uninferable turn, but Uninferable.'
exception whist_core.game.errors.NoTrumpSelectedError

Bases: Exception

Raised when no trump is selected for hand.

exception whist_core.game.errors.RubberNotDoneError

Bases: Exception

Raised if the current rubber is not done, but action requested requires it to be done.

exception whist_core.game.errors.TrickDoneError

Bases: Exception

Raised when the trick is already done.