From 2b71ca625ed07697eb8f53d26ec57f92802b46e5 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Sat, 26 Nov 2022 10:50:09 +0100 Subject: fix BotMatch winner assignment --- web/pw-server/src/lib/components/matches/BotMatchCard.svelte | 1 - web/pw-server/src/lib/matches.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'web/pw-server') diff --git a/web/pw-server/src/lib/components/matches/BotMatchCard.svelte b/web/pw-server/src/lib/components/matches/BotMatchCard.svelte index 2f50173..59879c7 100644 --- a/web/pw-server/src/lib/components/matches/BotMatchCard.svelte +++ b/web/pw-server/src/lib/components/matches/BotMatchCard.svelte @@ -52,7 +52,6 @@ width: 75px; display: flex; justify-content: center; - margin-top: -4px; } .bot-match-card-main { diff --git a/web/pw-server/src/lib/matches.ts b/web/pw-server/src/lib/matches.ts index d889a0d..9af8943 100644 --- a/web/pw-server/src/lib/matches.ts +++ b/web/pw-server/src/lib/matches.ts @@ -38,7 +38,7 @@ export function apiMatchtoBotMatch(bot_name: string, apiMatch: ApiMatch): BotMat let outcome: BotMatchOutcome; if (apiMatch.winner === playerIndex) { outcome = "win"; - } else if (apiMatch.winner) { + } else if (apiMatch.winner !== null) { outcome = "loss"; } else { outcome = "tie"; -- cgit v1.2.3