sol.models.boards
-- Boards¶
- class sol.models.board.Board(**kwargs)¶
A single board.
This table contains the detailed scores of a single match.
Since entering such details is very time-consuming, historically and usually only the final scores of the match are assigned.
Note
In normal boards coinsX is the number of carrommen of the opponent competitor still on the table at the end of the board; coins1 and coins2 are thus mutually exclusive (ie, one is zero) and the board is won by the competitor with a coins number greater than zero, with a score equal to that number plus possibly the points of the queen if pocketed by him.
In training boards coins1 and coins2 are actually the number of misses of the respective competitors, in other words how many unsuccessful shots they made: the meaning is reversed, the board is won by the competitor with the lower number. The queen field has no meaning.
- serialize(serializer: Serializer) SerializedBoard ¶
Reduce a single board to a simple dictionary.
- Parameters:
serializer -- a
Serializer
instance- Returns:
a plain dictionary containing a flatified view of this board
- coins1: Mapped[int | None]¶
Coins of the first
competitor
in this board.
- coins2: Mapped[int | None]¶
Coins of the second
competitor
in this board.
- property description¶
Return a possibly HTML-decorated caption of the entity.
- Parameters:
html -- either
None
(the default) or a boolean valuelocalized -- a boolean value,
True
by default
- Return type:
str
If html is
None
orTrue
then the result may be an HTML representation of the entity, otherwise it is plain text.If localized is
False
then the localization is turned off.
- idboard: Mapped[int]¶
Primary key.
- number: Mapped[int]¶
Progressive number of the board.
- queen: Mapped[str | None]¶
Which competitor pocketed the Queen, if any.
- score1: int | None = None¶
The score of this board for the first
competitor
.
- score2: int | None = None¶
The score of this board for the second
competitor
.
- total_score1: int | None = None¶
The partial score of the
match
up to this board, for the firstcompetitor
, while it is still being played.
- total_score2: int | None = None¶
The partial score of the
match
up to this board, for the secondcompetitor
, while it is still being played.