A simple server and web client to play Schafkopf over the internet https://christophhagen.de/projects/software/schafkopf/en.html
Go to file
2023-02-01 20:10:57 +01:00
Public Explain API path 2022-11-24 21:31:19 +01:00
Resources Add monitoring 2023-01-31 22:16:44 +01:00
Sources Update metrics 2023-02-01 20:10:57 +01:00
Tests/AppTests first commit 2021-11-25 19:15:38 +01:00
.gitignore Add example config 2022-11-24 21:39:35 +01:00
banner.jpg Add banner image 2022-11-25 13:10:00 +01:00
game.jpg Update game.jpg 2022-11-25 13:02:40 +01:00
Package.swift Add monitoring 2023-01-31 22:16:44 +01:00
Readme.md Add banner image 2022-11-25 13:10:00 +01:00

Schafkopf Server

This package provides a simple server to play the Bavarian game Schafkopf via a browser.

Setup

Configuration

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.

{
    "serverPort": 8000,
    "production": false,
    "mail": {
        "serverDomain": "https://example.com/schafkopf",
        "emailHostname": "example.com",
        "email": "schafkopf@example.com",
        "password": "some-secret-string",
        "tokenExpiryDuration": 15,
    }
}

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.

You also need to set the API path in the Public/api.js file to the path where the server is run.

const apiPath = "/schafkopf"

The server can be then be run like any other executable swift package:

swift run

Roadmap

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

Improvements

  • Layout improvements for mobile devices in landscape mode
  • Complete German/English localization
  • Add last online date to user data
  • Allow enter key to start login