forked from Hanabi/hanabi-league
fix order of leader cards
This commit is contained in:
parent
55148c48ab
commit
081601f0f7
3 changed files with 6 additions and 8 deletions
|
@ -67,7 +67,7 @@ body {
|
|||
}
|
||||
.stat-description {
|
||||
display: inline-block;
|
||||
width: 19em;
|
||||
width: 13em;
|
||||
}
|
||||
.history-bullets {
|
||||
display: flex;
|
||||
|
|
|
@ -2,8 +2,6 @@ import shutil
|
|||
from pathlib import Path
|
||||
from typing import Dict, List
|
||||
|
||||
import subprocess
|
||||
|
||||
import jinja2
|
||||
import datetime
|
||||
import psycopg2.extras
|
||||
|
@ -82,7 +80,7 @@ def get_rating_lists() -> Dict[int, List[PlayerEntry]]:
|
|||
rating_types = [utils.get_rating_type(x) for x in [False, True]]
|
||||
leaderboard = {
|
||||
utils.get_rating_type(x): []
|
||||
for x in [True, False]
|
||||
for x in [False, True]
|
||||
}
|
||||
for rating_type in rating_types:
|
||||
cur.execute(
|
||||
|
@ -168,9 +166,9 @@ def get_variant_rows() -> List[VariantRow]:
|
|||
" current_rating,"
|
||||
" COUNT(games.id) AS games_played,"
|
||||
" COUNT(games.id) FILTER (WHERE ratings.num_suits * 5 = games.score) AS games_won,"
|
||||
" SUM(game_statistics.num_bottom_deck_risks) AS total_bdr,"
|
||||
" SUM(game_statistics.num_crits_lost) AS total_crits_lost,"
|
||||
" SUM(games.num_turns) AS total_turns "
|
||||
" COALESCE(SUM(game_statistics.num_bottom_deck_risks), 0) AS total_bdr,"
|
||||
" COALESCE(SUM(game_statistics.num_crits_lost), 0) AS total_crits_lost,"
|
||||
" COALESCE(SUM(games.num_turns), 0) AS total_turns "
|
||||
"FROM "
|
||||
" ("
|
||||
" SELECT DISTINCT ON (variants.id, variant_base_ratings.num_players)"
|
||||
|
|
|
@ -79,6 +79,6 @@ def get_rating_type(clue_starved: bool):
|
|||
|
||||
def describe_rating_type(rating_type: int):
|
||||
if rating_type == 0:
|
||||
return "Standard"
|
||||
return "No Variant"
|
||||
elif rating_type == 1:
|
||||
return "Clue Starved"
|
Loading…
Reference in a new issue