-
Notifications
You must be signed in to change notification settings - Fork 0
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:
- Create a new module in
server/games/. - Implement a class that is derived from
AbstractGame. - Override the base class's methods.
- 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.