Feat: player stats [WIP]
This commit is contained in:
		| @@ -86,3 +86,20 @@ CREATE TABLE journal( | ||||
|     FOREIGN KEY (username) REFERENCES players(username) ON DELETE CASCADE, | ||||
|     FOREIGN KEY (room_id) REFERENCES rooms(id) ON DELETE CASCADE | ||||
| ); | ||||
|  | ||||
| CREATE TABLE player_stats ( | ||||
|     id INTEGER PRIMARY KEY AUTOINCREMENT, | ||||
|     player_username TEXT NOT NULL UNIQUE, | ||||
|     games_played INTEGER NOT NULL DEFAULT 0, | ||||
|     games_won INTEGER NOT NULL DEFAULT 0, | ||||
|     games_lost INTEGER NOT NULL DEFAULT 0, | ||||
|     opened_opposite_words INTEGER NOT NULL DEFAULT 0, | ||||
|     opened_white_words INTEGER NOT NULL DEFAULT 0, | ||||
|     opened_black_words INTEGER NOT NULL DEFAULT 0, | ||||
|     mime_winrate REAL NOT NULL DEFAULT 0.0, | ||||
|     guesser_winrate REAL NOT NULL DEFAULT 0.0, | ||||
|     played_as_mime INTEGER NOT NULL DEFAULT 0, | ||||
|     played_as_guesser INTEGER NOT NULL DEFAULT 0, | ||||
|     FOREIGN KEY (player_username) REFERENCES players(username) ON DELETE CASCADE | ||||
| ); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder