Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
Joshua Blake edited this page Sep 5, 2016 · 20 revisions

Each game has its own instance of a game container. The game container is responsible for maintaining the game state, the worker avatars for the game, fetching the actions from each worker, and applying the worker.

The game interacts with the rest of the components as follows:

  • It is created by the game creator.
  • It creates workers and restarts them when a user changes their avatar's code.
  • It exposes an API to provide the workers with the code.
  • It will (#124) fetch the game settings from the UI.

Once per turn it will:

  • Inform all workers of the current game state and gets their actions.
  • Perform conflict resolution on these actions and then apply them.
  • Update the world with any other changes (eg move score squares).
Clone this wiki locally