Add logo, readme

This commit is contained in:
s3lph 2022-10-13 04:41:31 +02:00
parent 633bd31165
commit c34ec3d30a
Signed by: s3lph
GPG key ID: 8AC98A811E5BEFF5
3 changed files with 107 additions and 0 deletions

65
README.md Normal file
View file

@ -0,0 +1,65 @@
![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)

BIN
logo/webgames.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

42
logo/webgames.svg Normal file
View file

@ -0,0 +1,42 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" version="2.0">
<defs>
<pattern id="semifill-red" width="20" height="9" fill="none" patternUnits="userSpaceOnUse">
<path stroke="#ff0000" d="M 0 2 C 5 2, 5 -3, 10 -3 C 15 -3, 15 2, 20 2 M 0 5 C 5 5, 5 0, 10 0 C 15 0, 15 5, 20 5 M 0 8 C 5 8, 5 3, 10 3 C 15 3, 15 8, 20 8 M 0 11 C 5 11, 5 6, 10 6 C 15 6, 15 11, 20 11 M 0 14 C 5 14, 5 9, 10 9 C 15 9, 15 14, 20 14" />
</pattern>
<pattern id="semifill-green" width="20" height="9" fill="none" patternUnits="userSpaceOnUse">
<path stroke="#00ff00" d="M 0 2 C 5 2, 5 -3, 10 -3 C 15 -3, 15 2, 20 2 M 0 5 C 5 5, 5 0, 10 0 C 15 0, 15 5, 20 5 M 0 8 C 5 8, 5 3, 10 3 C 15 3, 15 8, 20 8 M 0 11 C 5 11, 5 6, 10 6 C 15 6, 15 11, 20 11 M 0 14 C 5 14, 5 9, 10 9 C 15 9, 15 14, 20 14" />
</pattern>
<pattern id="semifill-blue" width="20" height="9" fill="none" patternUnits="userSpaceOnUse">
<path stroke="#0000ff" d="M 0 2 C 5 2, 5 -3, 10 -3 C 15 -3, 15 2, 20 2 M 0 5 C 5 5, 5 0, 10 0 C 15 0, 15 5, 20 5 M 0 8 C 5 8, 5 3, 10 3 C 15 3, 15 8, 20 8 M 0 11 C 5 11, 5 6, 10 6 C 15 6, 15 11, 20 11 M 0 14 C 5 14, 5 9, 10 9 C 15 9, 15 14, 20 14" />
</pattern>
<filter id="drop" x="0" y="0">
<feDropShadow dx="10" dy="10" stdDeviation="5" />
</filter>
<filter id="new" x="0" y="0">
<feDropShadow dx="10" dy="10" stdDeviation="5" flood-color="gold" />
</filter>
</defs>
<g id="playercard1" stroke-width="2" transform="rotate(-10) translate(-3, 50)">
<rect class="svgcard" width="100" height="180" rx="10" stroke="#000000" fill="#ffffff" />
<g class="svgcard" id="symbols">
<ellipse cx="50" cy="90" rx="30" ry="10" stroke="#0000ff" fill="url(#semifill-blue)" />
</g>
</g>
<g id="playercard1" stroke-width="2" transform="translate(77, 40)">
<rect class="svgcard" width="100" height="180" rx="10" stroke="#000000" fill="#ffffff" />
<g class="svgcard" id="symbols">
<rect x="20" width="60" height="20" y="80" stroke="#ff0000" fill="none" />
</g>
</g>
<g id="playercard2" stroke-width="2" transform="rotate(10) translate(157, 20)">
<rect class="svgcard" width="100" height="180" rx="10" stroke="#000000" fill="#ffffff" />
<g class="svgcard" id="symbols">
<path width="60" height="20" transform="translate(20, 80)" stroke="#00ff00" fill="#00ff00"
d="M 0 15 C 0 5, 5 0, 15 0 C 25 0, 35 5, 45 5 C 50 5, 53 0, 55 0 C 57 0, 60 0, 60 5 C 60 15, 55 20, 45 20 C 35 20, 25 15, 15 15 C 10 15, 7 20, 5 20 C 3 20, 0 20,0 15 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB