feat(elo): add ELO rating system
- DB: elo column on user table (default 1200, added via ALTER TABLE IF NOT EXISTS) - ELO calculated after every game save (K=32, min 100) - Bots use their fixed ELO values; only human players' ELO changes - AI page games save with bot name (e.g. 'Holzpferd Heinz') instead of 'Stockfish' - User profile shows ELO badge below name - Header shows current ELO for logged-in users (links to profile) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1
types/index.d.ts
vendored
1
types/index.d.ts
vendored
@@ -27,6 +27,7 @@ export interface User {
|
||||
wins?: number;
|
||||
losses?: number;
|
||||
draws?: number;
|
||||
elo?: number;
|
||||
role?: "user" | "admin";
|
||||
|
||||
// mainly for players, not spectators
|
||||
|
||||
Reference in New Issue
Block a user