Schafkopf-Server/Readme.md

56 lines
1.5 KiB
Markdown
Raw Normal View History

2022-11-24 21:31:10 +01:00
# Schafkopf Server
2021-12-03 18:03:29 +01:00
2022-11-24 21:31:10 +01:00
This package provides a simple server to play the Bavarian game *Schafkopf* via a browser.
2021-12-03 18:03:29 +01:00
2022-11-24 21:31:10 +01:00
## Setup
2021-12-03 18:03:29 +01:00
2022-11-24 21:31:10 +01:00
#### Configuration
2021-12-03 18:03:29 +01:00
2022-11-24 21:31:10 +01:00
Create a `config.json` file in the `Resources` directory, and fill in all required information. You can have a look at the `config_example.json` file for the required fields.
2021-12-03 18:03:29 +01:00
2022-11-24 21:31:10 +01:00
```json
{
"serverPort": 8000,
"production": false,
"mail": {
"serverDomain": "https://example.com/schafkopf",
"emailHostname": "example.com",
"email": "schafkopf@example.com",
"password": "some-secret-string",
"tokenExpiryDuration": 15,
}
}
```
2021-12-03 18:03:29 +01:00
2022-11-24 21:31:10 +01:00
If `production` is set to `false´, then the database will only be created in memory, and deleted when the server is terminated.
The `mail` configuration is optional, and used to send the password recovery emails.
2021-12-03 18:03:29 +01:00
2022-11-24 21:31:10 +01:00
You also need to set the API path in the `Public/api.js` file to the path where the server is run.
```js
const apiPath = "/schafkopf"
```
2021-12-03 18:03:29 +01:00
2022-11-24 21:31:10 +01:00
The server can be then be run like any other executable swift package:
```bash
swift run
```
2021-11-29 11:54:59 +01:00
# Roadmap
2022-11-24 21:31:10 +01:00
There are a few features still missing from this implementation:
- Global rankings of players by their points
- Point penalties for players leaving a running game
- Computer players
- Automatically playing a card after a timeout
- Table options to allow/disallow games and change other settings
- iOS App
2021-11-29 11:54:59 +01:00
2022-11-24 21:31:10 +01:00
## Improvements
2021-11-29 11:54:59 +01:00
2022-11-24 21:31:10 +01:00
- Layout improvements for mobile devices in landscape mode
- Complete German/English localization
- Add last online date to user data
2021-11-29 11:54:59 +01:00