ImmutableStatusBuilder
An immutable implementation of model.status.StatusBuilder
Value parameters
- amount
-
the amount of cards each player should have while the stack is non-empty, initially set to 0.
- defended
-
a list of all currently defended cards, initially set to Nil
- denied
-
whether the player with the turn model.turn.FirstlyAttacking denied his attack, initially set to false
- passed
-
the player who initially passed cards of the same rank to the next player, initially set to None
- players
-
a list of all players, initially set to Nil
- stack
-
a list of all cards, representing the stack, initially set to Nil
- trump
-
an Option containing the trump. The trump is the last element on the stack, initially set to None.
- turn
-
the current turn, initially set model.Turn.Uninitialized
- undefended
-
a list of all currently undefended cards, initially set to Nil
- used
-
a list of all currently cards used to defend, initially set to Nil
Attributes
- Graph
-
- Supertypes
Members list
Value members
Constructors
Sets all values to their default.
Sets all values to their default.
Attributes
Concrete methods
Retrieves a player by its turn.
Retrieves a player by its turn.
Value parameters
- turn
-
the turn to search for
Attributes
- Returns
-
the player with the specified turn. If no player has the specified turn, None is returned.
- Definition Classes
Retrieves the card amount.
Retrieves the defended cards.
Retrieves the defended cards.
Attributes
- Returns
-
the defended cards
- Definition Classes
Retrieves the passed player.
Retrieves the passed player.
Attributes
- Returns
-
the passed player. If no player passed, None is returned.
- Definition Classes
Retrieves the players.
Retrieves the stack.
Retrieves the trump.
Retrieves the trump.
Attributes
- Returns
-
the trump. If no trump is set, None is returned.
- Definition Classes
Retrieves the current turn.
Retrieves the undefended cards.
Retrieves the undefended cards.
Attributes
- Returns
-
the undefended cards
- Definition Classes
Retrieves the used cards.
Retrieves the denied flag.
Sets the passed player to None.
Sets the passed player to None.
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Sets the trump to None
Resets the rounds by setting the turn to model.Turn.FirstlyAttacking and the defended, undefended and used cards to empty lists. The denied flag is set to false.
Resets the rounds by setting the turn to model.Turn.FirstlyAttacking and the defended, undefended and used cards to empty lists. The denied flag is set to false.
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Sets the amount to the specified amount.
Sets the amount to the specified amount.
Value parameters
- amount
-
the amount to set
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Sets the defended cards to the specified card list.
Sets the defended cards to the specified card list.
Value parameters
- defended
-
the defended cards to set
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Sets the denied flag to the specified value.
Sets the denied flag to the specified value.
Value parameters
- denied
-
the denied flag to set
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Sets the passed player to the specified player.
Sets the passed player to the specified player.
Value parameters
- passed
-
the passed player to set
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Sets the players to the specified player list.
Sets the players to the specified player list.
Value parameters
- players
-
the players to set
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Sets the stack to the specified card list.
Sets the stack to the specified card list.
Value parameters
- stack
-
the stack to set
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Sets all values to the values provided by the specified status.
Sets all values to the values provided by the specified status.
Value parameters
- status
-
the status to read from
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Sets the trump to the specified card.
Sets the trump to the specified card.
Value parameters
- trump
-
the trump to set
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Sets the turn to the specified turn.
Sets the turn to the specified turn.
Value parameters
- turn
-
the turn to set
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Sets the undefended cards to the specified card list.
Sets the undefended cards to the specified card list.
Value parameters
- undefended
-
the undefended cards to set
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Sets the used cards to the specified card list.
Sets the used cards to the specified card list.
Value parameters
- used
-
the used cards to set
Attributes
- Returns
-
an updated model.status.StatusBuilder
- Definition Classes
Builds the status.