Skip to content

Reference

tilttek/game-night

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

Nights

TypeRole
GameNightsThe service: planning, tables, publication, sign-ups, withdrawals, seats, the vote and cancellation.
GameNightA night: when and where, its host, its tables, its sign-ups, its waiting list, its games proposed and its votes, and its version.
NightStatusDraft, published or cancelled.
TableA table: its seats, its game and the member who leads it.
RegistrationA member signed up, with a guest or alone, confirmed or waiting, and their table.
RegistrationStatusConfirmed or waiting.
NightPlaysThe service that sends the games played to the play log.
PlayedGameA game played at a table of a night.

Choosing games

TypeRole
Choice\GameChooserSuggests games for the players and the minutes.
Choice\CriteriaWhat a game is chosen for.
Choice\SuggestionA game suggested, with the votes it rests on.
Choice\OwnedGameA game a member can bring.

The vote

TypeRole
Vote\VoteResultThe vote counted and explained.
Vote\TallyThe votes of one game and its share.
Vote\VoteOutcomeNo votes, a winner or a tie.

Ports and stores

TypeRole
Contract\NightStoreKeeps the nights at a version.
Contract\NightObserverTold of the events of a night.
Contract\ShelfReaderReads the games the members can bring.
Contract\PlayJournalReceives the games played.
Store\InMemoryNightStoreThe nights in memory, for tests.

Events

TypeRole
Event\NightEventEvery event: the identifier of the night.
Event\NightPublishedThe night opened to sign-ups.
Event\NightFullThe last free seat was taken.
Event\NightCancelledThe night was cancelled.
Event\SeatOfferedA member waiting holds their places.

Exceptions

TypeRole
Exception\GameNightExceptionEvery exception of the library.
Exception\InvalidNightA value out of its shape or its bounds.
Exception\NightRefusedA change the night does not allow now.
Exception\NightConflictThe night changed since it was read.
Exception\NightNotFoundNo night has the identifier.

Internal

TypeRole
Internal\IdentifierThe shape of the identifiers. Internal.