fix BotMatch winner assignment
This commit is contained in:
parent
2dc6b98177
commit
2b71ca625e
2 changed files with 1 additions and 2 deletions
|
@ -52,7 +52,6 @@
|
||||||
width: 75px;
|
width: 75px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: -4px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot-match-card-main {
|
.bot-match-card-main {
|
||||||
|
|
|
@ -38,7 +38,7 @@ export function apiMatchtoBotMatch(bot_name: string, apiMatch: ApiMatch): BotMat
|
||||||
let outcome: BotMatchOutcome;
|
let outcome: BotMatchOutcome;
|
||||||
if (apiMatch.winner === playerIndex) {
|
if (apiMatch.winner === playerIndex) {
|
||||||
outcome = "win";
|
outcome = "win";
|
||||||
} else if (apiMatch.winner) {
|
} else if (apiMatch.winner !== null) {
|
||||||
outcome = "loss";
|
outcome = "loss";
|
||||||
} else {
|
} else {
|
||||||
outcome = "tie";
|
outcome = "tie";
|
||||||
|
|
Loading…
Reference in a new issue