Skip to content

Adding new games

Fabian Eberts edited this page Apr 25, 2026 · 2 revisions

Adding a new game is easy. All you have to do is derive from a base class and override a handful of methods. The easiest way to add a game is to use the template (server/games/template.py), which is structured like a tutorial.

Here is a summary of the required steps:

  1. Create a new module in server/games/.
  2. Implement a class that is derived from AbstractGame.
  3. Override the base class's methods.
  4. Add the new class to the list of games (server/games_list.py).

No modifications to the API are required when adding new games. It was designed to be compatible with any game. The function to submit a move accepts keyword arguments (**kwargs). These are sent to the server, where they are passed to the corresponding function of the game class as a dictionary. The game state is also sent back as a dictionary. This allows for a maximum of flexibility.

Clone this wiki locally