diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-11-26 10:50:09 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-11-26 10:50:09 +0100 |
commit | 2b71ca625ed07697eb8f53d26ec57f92802b46e5 (patch) | |
tree | 1f099e39e8c2dffcc1908ffcf756f51068123cbb /web/pw-server/src/lib/matches.ts | |
parent | 2dc6b981778c2d6d94066bc837036b0288df0ab0 (diff) | |
download | planetwars.dev-2b71ca625ed07697eb8f53d26ec57f92802b46e5.tar.xz planetwars.dev-2b71ca625ed07697eb8f53d26ec57f92802b46e5.zip |
fix BotMatch winner assignment
Diffstat (limited to 'web/pw-server/src/lib/matches.ts')
-rw-r--r-- | web/pw-server/src/lib/matches.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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"; |