A simple server and web client to play Schafkopf over the internet https://christophhagen.de/projects/software/schafkopf/en.html
Go to file
2022-10-13 09:13:47 +02:00
Public Improve layout of action bar 2022-10-13 09:13:47 +02:00
Resources Persist registrations on disk 2021-12-01 12:45:42 +01:00
Sources Fix error creating a table 2022-10-12 22:02:01 +02:00
Tests/AppTests first commit 2021-11-25 19:15:38 +01:00
.dockerignore first commit 2021-11-25 19:15:38 +01:00
.gitignore Ignore user data 2021-12-01 22:48:42 +01:00
Package.swift Update macOS version for async/await 2022-10-12 19:32:15 +02:00
Readme.md First working version 2021-12-18 15:08:43 +01:00

Game process

  1. Register user
  • Store name, password
  • Create session token
  1. Create table
  • Store name
  • Create id
  • Add player to table
  1. Wait for all players
  2. Deal first 4 cards
  • Store all hand cards, show only 4
  1. Collect leger
  • Consecutive choice for each player
  1. Deal last 4 cards
  • Start bidding
  1. Bidding
  • Choice for each player to match/increase bid
  1. Select game
  • Highest bidder selects game
  • Move to playing
  1. Play cards
  • Allow shots until certain trick
  • Collect completed tricks
  • Determine winning card
  • End game on last card
  1. Finish game
  • Count points
  • Determine winner
  • Back to 4

Architecture

Messages to clients over the websocket

Table info

Contains the general information about the table:

  • Player names, Table name

ConnectionState

Indicates which players are currently online

GameState

  • Current player (either to play a card, state game intention, )
  • First player in the round
  • Game type (either game, or negotiation stage)

TODOs

Make UI for table

  • Show players (+ connection state)
  • Show played cards
  • Show own cards
  • Game negotiation

Updates from server

  • Players at table (+ connection state, first/current player)
  • Played cards
  • Current player
  • Game negotiation data
  • Remaining cards
  • Game results

API

  • Leave table
  • Start game
  • Send negotiation input
  • Send played card
  • Send

Logic

  • Shuffle cards
  • Cards, Card sets
  • Determine playable cards
  • Determine win of round
  • Rank game types, negotiation

Roadmap

Version 2:

  • Configure game options
  • Switch player positions
  • Set first player
  • Add game costs and player scores
  • Introduce "legen" and "schießen"

Version 3:

  • Private tables
  • Add simple computer player
  • Global statistics for players
  • Save data persistently
  • Table administrator can remove players

Bugs

  • Correctly show available games