Commit Graph

35 Commits

Author SHA1 Message Date
Kroonk
ca64163899 Switch theme palette to mint green
All checks were successful
Build & Push Docker Image to Gitea Registry / build-and-push (push) Successful in 2m31s
2026-05-20 17:48:10 +02:00
Michess
86fbdd39ed fix: resolve all 3 open Gitea issues
Issue #1 - Bot vs Bot Turnierspiele:
- triggerBotMove ruft sich rekursiv selbst auf wenn der nächste Spieler
  auch ein Bot ist (bot vs bot läuft jetzt vollautomatisch durch)
- startNextRoundGames erstellt aktive Spiele für die nächste Runde wenn
  eine Runde endet; bot vs bot Spiele starten sofort ohne Spectator
- updateRoundResult gibt jetzt die nächste Runden-Daten zurück statt void
- Alle Handler (sendMove, claimAbandoned, claimTimeout, triggerBotMove)
  starten die nächste Runde automatisch

Issue #2 - Bot-Schwierigkeit zu hoch:
- randomChance zu StockfishLevel hinzugefügt: Level 1=80%, 2=50%,
  3=15%, 4=3%, 5-6=0% zufällige Züge statt Stockfish-Best-Move
- Gilt sowohl für Socket-Bot-Züge als auch /v1/ai/move REST-Endpoint

Issue #3 - Turnier beenden + Zurück-Button:
- POST /:code/cancel Endpoint (nur Host), setzt status='finished'
- Turnier-Seite: 'Turnier beenden' Button für Host (rot, outline)
- tournamentCode Feld im Game-Typ; wird beim Erstellen von Turnierspielen
  gesetzt (inkl. Folgerunden)
- GamePage zeigt '← Zur Turnierübersicht' Link wenn tournamentCode gesetzt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 07:46:40 +02:00
Michess
b29c467766 feat: add friend invite modal to all game modes
- New InviteFriendsModal component: fetches friends list, sends game
  invite via notification socket with per-friend sent confirmation
- Multiplayer (GamePage): invite button below copy link, hidden after game ends
- Correspondence: invite button in waiting-for-opponent card
- Tournament: invite button for joined players while status is waiting
- Invite links use mode-prefixed codes (correspondence/XYZ, tournament/XYZ)
  so notification "Beitreten" button navigates to the correct page

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 13:16:00 +02:00
Michess
aeb5fe313e feat: add time controls, correspondence games, and tournament mode
**Zeitmodi (Blitz/Rapid):**
- 5, 10, 30 Min Zeitkontrolle bei Spielerstellung
- Server-seitige Uhren: Zeit wird bei jedem Zug abgezogen
- Timeout-Erkennung via claimTimeout Socket-Event
- Schachuhr-Anzeige in GamePage (rot bei < 30s)
- Turnierspiele erhalten automatisch Zeitkontrolle

**Tagespartien (Correspondence):**
- Neue DB-Tabelle correspondence_game
- REST API: erstellen, beitreten, Zug machen, aufgeben
- Seite /correspondence: Liste aktiver Tagespartien
- Seite /correspondence/[code]: Spielen mit interaktivem Brett
- Einladungslink teilen, Gegner tritt via Link bei

**Turniermodus (Round-Robin):**
- Neue DB-Tabellen: tournament, tournament_player, tournament_round
- Round-Robin Paarungen mit Circle-Methode
- Turnier erstellen: /tournament/create
- Turnierliste: /tournament
- Turnierseite /tournament/[code]: Standings, Runden, Spiele
- Automatische Aktivisierung der nächsten Runde
- Turnierspiele werden als normale activeGames erstellt
- Ergebnisse aktualisieren Punkte automatisch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 09:44:35 +02:00
Michess
09e5271dfb feat: redesign homepage layout and fix invite links
- Homepage: Grid-Layout mit 3 Karten (Spiel erstellen, KI, Freunde/Beitreten)
  statt vertikalem Stack mit Dividers
- CreateGame: kompakteres Styling, auf Deutsch, in Primary-Card integriert
- Einladungslink: APP_URL statt hardcoded ches.su in GamePage und CopyLink
- JoinGame: URL-Parsing für beliebige Domains (nicht nur ches.su)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 07:49:59 +02:00
Michess
694177c108 feat: Vollständiges Rebranding zu MiChess, Copyright Tom Misch
- Alle @chessu/ → @michess/ (Package-Namen und Imports)
- Theme-Namen chessuDark/Light → michessDark/Light
- Alle Display-Texte: chessu/Michess → MiChess
- Autor: dotnize → Tom Misch
- Copyright: Nathaniel Tampus → Tom Misch
- README komplett neu (Deutsch, MiChess-spezifisch)
- CONTRIBUTING.md neu
- FUNDING.yml + CODE_OF_CONDUCT.md entfernt
- Fork-Hinweis auf chessu bleibt im README erhalten (MIT-Pflicht)
- pnpm-lock.yaml entfernt (wird beim Build neu generiert)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:47:16 +02:00
Nathaniel Tampus
d5008a88fa format 2024-01-15 19:55:20 +08:00
Nathaniel Tampus
970989579b use endReason to check if game has ended 2023-05-01 21:11:02 +08:00
Nathaniel Tampus
da7b4c40a3 organize imports 2023-05-01 15:15:49 +08:00
Nathaniel Tampus
2114fbe9e6 don't update turn title if game is over 2023-04-07 12:44:05 +08:00
Nathaniel Tampus
5a00210a4d update anchor tags rel attribute 2023-04-07 12:37:47 +08:00
Nathaniel Tampus
8d7ad6161f colored & linked name for registered users 2023-04-05 23:37:07 +08:00
Nathaniel Tampus
1636e1131e viewable archived games 2023-04-02 15:22:01 +08:00
Nathaniel Tampus
8d19c88c83 rename reason to endReason 2023-04-01 20:58:29 +08:00
Nathaniel Tampus
ae86dbbc77 center elements for claiming abandoned game 2023-03-26 01:13:50 +08:00
Nathaniel Tampus
d469cdff56 allow player to claim win/draw for abandoned games 2023-03-25 19:18:01 +08:00
Nathaniel Tampus
f564298c93 login and register tabs, initial user dashboard 2023-03-19 20:53:59 +08:00
Nathaniel Tampus
e055c1f807 update "copied to clipboard" badge layout 2023-03-15 20:26:54 +08:00
Nathaniel Tampus
3821c4b43a update game url to use game code directly 2023-03-15 19:54:15 +08:00
Nathaniel Tampus
3c46b485c3 only scroll moves container instead of whole page 2023-03-13 20:21:08 +08:00
Nathaniel Tampus
055cc5781d scroll to active move button only when needed 2023-03-12 21:24:24 +08:00
Nathaniel Tampus
f7aba38d82 add initial message and fix server message style 2023-03-12 20:27:26 +08:00
Nathaniel Tampus
034ba1a206 move history navigation (closes #9) 2023-03-12 19:54:22 +08:00
Nathaniel Tampus
e2a0f361cf small structure changes for less redundancy 2023-03-12 13:29:06 +08:00
Nathaniel Tampus
a9480ffd3a experimental premove support (closes #7) 2023-03-11 13:09:33 +08:00
Nathaniel Tampus
7d704a94a6 show dropdown when link copied 2023-03-06 19:24:31 +08:00
Nathaniel Tampus
19880c0818 chat messages styling 2023-03-06 18:42:47 +08:00
Nathaniel Tampus
99b73fb1c1 scrollbar styling 2023-03-06 18:19:47 +08:00
Nathaniel Tampus
d858853bf4 move validation fixes, update page title on turn 2023-03-06 15:11:35 +08:00
Nathaniel Tampus
158aef552a improve moveFrom safety 2023-03-06 13:47:39 +08:00
Nathaniel Tampus
fe0e045fd8 show player disconnected state 2023-03-06 12:42:49 +08:00
Nathaniel Tampus
82ca2791c3 improve player names format 2023-03-05 22:27:36 +08:00
Nathaniel Tampus
802e5bb801 btn-disabled instead of loading to preserve size 2023-03-05 22:08:28 +08:00
Nathaniel Tampus
247a6c1c76 initial playable functionality
TODO: restructure
- this is mostly a copy-paste from the old game and socket handlers
2023-03-05 19:07:23 +08:00
Nathaniel Tampus
69fb7a7c9d add wrapper component to check auth 2023-03-05 10:00:55 +08:00