StatusBuilder

model.status.StatusBuilder

A builder for model.status.Status

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def byTurn(turn: Turn): Option[Player]

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.

def getAmount: Int

Retrieves the card amount.

Retrieves the card amount.

Attributes

Returns

the card amount

def getDefended: List[Card]

Retrieves the defended cards.

Retrieves the defended cards.

Attributes

Returns

the defended cards

def getPassed: Option[Player]

Retrieves the passed player.

Retrieves the passed player.

Attributes

Returns

the passed player. If no player passed, None is returned.

def getPlayers: List[Player]

Retrieves the players.

Retrieves the players.

Attributes

Returns

the players

def getStack: List[Card]

Retrieves the stack.

Retrieves the stack.

Attributes

Returns

the stack

def getTrump: Option[Card]

Retrieves the trump.

Retrieves the trump.

Attributes

Returns

the trump. If no trump is set, None is returned.

def getTurn: Turn

Retrieves the current turn.

Retrieves the current turn.

Attributes

Returns

the current turn

def getUndefended: List[Card]

Retrieves the undefended cards.

Retrieves the undefended cards.

Attributes

Returns

the undefended cards

def getUsed: List[Card]

Retrieves the used cards.

Retrieves the used cards.

Attributes

Returns

the used cards

def isDenied: Boolean

Retrieves the denied flag.

Retrieves the denied flag.

Attributes

Returns

the denied flag

Sets the passed player to None.

Sets the passed player to None.

Attributes

Returns

an updated model.status.StatusBuilder

Sets the trump to None

Sets the trump to None

Attributes

Returns

an updated model.status.StatusBuilder

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

def setAmount(amount: Int): StatusBuilder

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

def setDefended(defended: List[Card]): StatusBuilder

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

def setDenied(denied: Boolean): StatusBuilder

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

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

def setPlayers(players: List[Player]): StatusBuilder

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

def setStack(stack: List[Card]): StatusBuilder

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

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

def setTrump(trump: Card): StatusBuilder

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

def setTurn(turn: Turn): StatusBuilder

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

def setUndefended(undefended: List[Card]): StatusBuilder

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

def setUsed(used: List[Card]): StatusBuilder

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

def status: Status

Builds the status.

Builds the status.

Attributes

Returns

the status