Skip to content

Extension points

tilttek/game-engine

The package is at 0.x: its extension points are stable only from its 1.0 release. Until then, a minor version may change them, and its CHANGELOG says how.

PointWhat an application givesWhere
Contract\GameA game: its definition, setup, rules, phases entered, ending and viewsWriting a game
Contract\LogStoreThe storage of the logs, the truth of every tableStoring and publishing
Contract\StateCacheA cache of the current statesStoring and publishing
Contract\TablePublisherHow the players learn that a table changed: Mercure, a WebSocketStoring and publishing

Every point is passed to the constructor of Tables or of Games; the engine and Tables keep no state of their own between two calls.