Skip to content

Reference

tilttek/spotlight

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

Tables

TypeRole
SpotlightThe service: open, give, give next, release, raise and lower a hand, pause, resume, join, leave, close and view.
TableA table: its players in seat order, the scene in progress, the queue, its state and its version.
PlayerShareOne player's count: time held, scenes, the end of their last scene, and since when they wait.
VisibilityWho sees the counts: the game master or the whole table.
FairnessPolicyWhen a player is behind: a part of the fair share, after a warm-up.
View\SpotlightViewThe table at a moment, for the game master or for the table.
View\PlayerSpotlightOne player's spotlight at a moment.

Ports and stores

TypeRole
Contract\TableStoreKeeps the tables at a version.
Contract\SpotlightObserverTold of the events of a table.
Store\InMemoryTableStoreThe tables in memory, for tests.

Events

TypeRole
Event\SpotlightEventEvery event: the table's identifier.
Event\PlayerEventAn event of one player: adds the player's identifier.
Event\TableOpenedA table was opened.
Event\SceneGivenA player was given the scene.
Event\SceneEndedA player's scene ended, with its milliseconds.
Event\HandRaisedA player raised their hand.
Event\HandLoweredA player lowered their hand.
Event\SpotlightPausedA table was paused.
Event\SpotlightResumedA table counts again.
Event\PlayerJoinedA player joined the table.
Event\PlayerLeftA player left the table.
Event\TableClosedA table was closed.

Exceptions

TypeRole
Exception\SpotlightExceptionEvery exception of the library.
Exception\InvalidSpotlightA value out of its shape or its bounds.
Exception\SpotlightRefusedA change not allowed on the table in its state.
Exception\SpotlightNotFoundNo such table or player.
Exception\SpotlightConflictThe table changed since it was read.

Internal

TypeRole
Internal\IdentifierThe shape of identifiers.
Internal\MillisInstants as milliseconds.