65 lines
1.5 KiB
Markdown
65 lines
1.5 KiB
Markdown
|
![3 «Set» cards](logo/webgames.svg)
|
||
|
|
||
|
# Webgames
|
||
|
|
||
|
Collection of just-good-enough browser-based multiplayer games written during COVID lockdown to play our favorite games remotely.
|
||
|
|
||
|
* No authentication
|
||
|
* No best practices
|
||
|
* No sophisticated web framework
|
||
|
* Just a bunch of multiplayer games quickly hacked together.
|
||
|
|
||
|
## Quickstart
|
||
|
|
||
|
```
|
||
|
python3 -m virtualenv venv
|
||
|
. venv/bin/acticate
|
||
|
pip install -e .
|
||
|
python -m webgames 0.0.0.0 8080
|
||
|
```
|
||
|
|
||
|
## Games
|
||
|
|
||
|
- **Sudoku**: Whoever finishes the sudoku first, wins
|
||
|
- [**Set**](https://en.wikipedia.org/wiki/Set_(card_game))
|
||
|
- [**Carcassonne**](https://en.wikipedia.org/wiki/Carcassonne_(board_game)) including some of its extensions
|
||
|
- [**Go**](https://en.wikipedia.org/wiki/Go_(game)): Play against another player or against the [GNU Go](https://www.gnu.org/software/gnugo/) engine. **Requires GNU Go to run in GTP mode as an inetd-style service** (see below)
|
||
|
|
||
|
|
||
|
### GNU Go Systemd Socket
|
||
|
|
||
|
The following example config configures a socket-actived systemd unit which runs GNU Go in GTP mode, listening on `/run/gnugo.sock`.
|
||
|
|
||
|
**/etc/systemd/system/gnugo@.service**:
|
||
|
|
||
|
```ini
|
||
|
[Unit]
|
||
|
Description=GNU Go GTP Daemon
|
||
|
|
||
|
[Service]
|
||
|
StandardInput=socket
|
||
|
ExecStart=/usr/games/gnugo --mode gtp
|
||
|
DynamicUser=yes
|
||
|
PrivateTmp=yes
|
||
|
NoNewPrivileges=yes
|
||
|
ProtectSystem=full
|
||
|
ProtectHome=yes
|
||
|
```
|
||
|
|
||
|
**/etc/systemd/system/gnugo.socket**:
|
||
|
|
||
|
```ini
|
||
|
[Unit]
|
||
|
Description=GNU Go GTP Socket
|
||
|
|
||
|
[Socket]
|
||
|
ListenStream=/run/gnugo.sock
|
||
|
Accept=true
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=sockets.target
|
||
|
```
|
||
|
|
||
|
## License
|
||
|
|
||
|
Licensed under the MIT License. See [LICENSE](./LICENSE)
|