Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leanprover-community/lean4game
Server to host lean games.
https://github.com/leanprover-community/lean4game
lean4 react
Last synced: about 2 months ago
JSON representation
Server to host lean games.
- Host: GitHub
- URL: https://github.com/leanprover-community/lean4game
- Owner: leanprover-community
- License: gpl-3.0
- Created: 2022-10-17T12:56:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-21T08:02:10.000Z (3 months ago)
- Last Synced: 2024-10-21T10:59:10.568Z (3 months ago)
- Topics: lean4, react
- Language: TypeScript
- Homepage: https://adam.math.hhu.de
- Size: 31.9 MB
- Stars: 185
- Watchers: 9
- Forks: 33
- Open Issues: 78
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- best-of-lean4 - GitHub - 32% open · ⏱️ 10.12.2024): (Games)
README
# Lean 4 Game
This is the source code for a Lean game platform hosted at [adam.math.hhu.de](https://adam.math.hhu.de).
## Creating a Game
Please follow the tutorial [Creating a Game](doc/create_game.md). In particular, the following steps might be of interest:
* Step 5: [How to Run Games Locally](doc/running_locally.md)
* Step 7: [How to Update an existing Game](doc/update_game.md)
* Step 9: [How to Publishing a Game](doc/publish_game.md)
* [Troubleshooting](doc/troubleshoot.md)## Documentation
The documentation is very much work in progress but the linked documentation here
should be up-to-date:### Game creation API
- [Creating a Game](doc/create_game.md): **the main document to consult**.
- [More about Hints](doc/hints.md): describes the `Hint` and `Branch` tactic.### Frontend API
* [How to Run Games Locally](doc/running_locally.md): play a game on your computer
* [How to Update an existing Game](doc/update_game.md): update to a new lean version
* [How to Publishing a Game](doc/publish_game.md): load your game to adam.math.hhu.de for others to play### Backend
not fully written yet.
* [Server](doc/DOCUMENTATION.md): describes the server part (i.e. the content of `server/` und `relay/`).
## Contributing
Contributions to `lean4game` are always welcome!
### Translation
The interface can be translated to various languages. For adding a translation, one needs to do the following:
1. In `client/src/config.json`, add your new language. The "iso" key is the ISO language code, i.e. it should be accepted by "i18next" and "GNU gettext"; the "flag" key is once accepted by [react-country-flag](https://www.npmjs.com/package/react-country-flag).
2. Run `npm run translate`. This should create a new file `client/public/locales/{language}/translation.json`. (alternatively you can copy-paste `client/public/locales/en/translation.json`)
3. Add all translations.
4. Commit the changes you made to `config.json` together with the new `translation.json`.For translating games, see [Translating a game](doc/translate.md).
## Security
Providing the use access to a Lean instance running on the server is a severe security risk. That is why we start the Lean server with bubblewrap.
## Credits
The project has primarily been developed by Alexander Bentkamp and Jon Eugster.
It is based on ideas from the [Lean Game Maker](https://github.com/mpedramfar/Lean-game-maker) and the [Natural Number Game
(NNG)](https://www.ma.imperial.ac.uk/~buzzard/xena/natural_number_game/)
by Kevin Buzzard and Mohammad Pedramfar, and on Patrick Massot's prototype: [NNG4](https://github.com/PatrickMassot/NNG4).