Reference
tilttek/spotlightEvery public type of the package, with its role. The types marked internal may change in any version.
Tables
| Type | Role |
|---|---|
Spotlight | The service: open, give, give next, release, raise and lower a hand, pause, resume, join, leave, close and view. |
Table | A table: its players in seat order, the scene in progress, the queue, its state and its version. |
PlayerShare | One player's count: time held, scenes, the end of their last scene, and since when they wait. |
Visibility | Who sees the counts: the game master or the whole table. |
FairnessPolicy | When a player is behind: a part of the fair share, after a warm-up. |
View\SpotlightView | The table at a moment, for the game master or for the table. |
View\PlayerSpotlight | One player's spotlight at a moment. |
Ports and stores
| Type | Role |
|---|---|
Contract\TableStore | Keeps the tables at a version. |
Contract\SpotlightObserver | Told of the events of a table. |
Store\InMemoryTableStore | The tables in memory, for tests. |
Events
| Type | Role |
|---|---|
Event\SpotlightEvent | Every event: the table's identifier. |
Event\PlayerEvent | An event of one player: adds the player's identifier. |
Event\TableOpened | A table was opened. |
Event\SceneGiven | A player was given the scene. |
Event\SceneEnded | A player's scene ended, with its milliseconds. |
Event\HandRaised | A player raised their hand. |
Event\HandLowered | A player lowered their hand. |
Event\SpotlightPaused | A table was paused. |
Event\SpotlightResumed | A table counts again. |
Event\PlayerJoined | A player joined the table. |
Event\PlayerLeft | A player left the table. |
Event\TableClosed | A table was closed. |
Exceptions
| Type | Role |
|---|---|
Exception\SpotlightException | Every exception of the library. |
Exception\InvalidSpotlight | A value out of its shape or its bounds. |
Exception\SpotlightRefused | A change not allowed on the table in its state. |
Exception\SpotlightNotFound | No such table or player. |
Exception\SpotlightConflict | The table changed since it was read. |
Internal
| Type | Role |
|---|---|
Internal\Identifier | The shape of identifiers. |
Internal\Millis | Instants as milliseconds. |