Skip to content

Reference

tilttek/play-log

Every public type of the package, with its role. The types marked internal may change in any version.

Plays

TypeRole
PlayLogThe service: record, correct, delete, confirm, decline, read and forget.
PlayA game played once: its game, the member who recorded it, its seats, its result, its date, minutes, group and place.
SeatA member or an anonymous player, with a score, whether they won, and whether the member confirmed it.
ResultCompetitive, a cooperative win, a cooperative loss, or unfinished.
PlayQueryWhich plays to read: of a member, waiting for a member, recorded by a member, or of a group, by game and period.
PlayQueryKindWhose plays a query reads.

Statistics

TypeRole
PlayStatisticsThe service: the statistics of a member or a group, computed when asked.
StatisticsWhat the plays of a member or a group add up to.
GameStatisticsWhat the plays of one game add up to.
PlayerStatisticsA member played with: their plays and wins.

Ports and stores

TypeRole
Contract\PlayStoreKeeps the plays at a version, and reads them by query.
Contract\PlayerConsentWhether a member agreed beforehand to be linked to another member's plays.
Contract\PlayObserverTold of the events of a play.
Store\InMemoryPlayStoreThe plays in memory, for tests.

Events

TypeRole
Event\PlayEventEvery event: the play and the game.
Event\PlayRecordedA play was recorded.
Event\PlayCorrectedA play was corrected.
Event\PlayDeletedA play was deleted.
Event\SeatLinkedA member's seat counts for them.
Event\SeatPendingA member's seat waits for their confirmation.
Event\SeatUnlinkedA member's seat no longer counts for them.

Exceptions

TypeRole
Exception\PlayLogExceptionEvery exception of the library.
Exception\InvalidPlayA value out of its shape or its bounds.
Exception\PlayRefusedA change the log does not allow.
Exception\PlayNotFoundNo play has the identifier.
Exception\PlayConflictThe play changed since it was read.

Internal

TypeRole
Internal\IdentifierThe shape of the identifiers. Internal.
Internal\TextThe shape of the place. Internal.
Internal\TallyThe counts of one computation of statistics. Internal.