Skip to content

Commit

Permalink
fixed minor issue with the picking players defaulting to values
Browse files Browse the repository at this point in the history
  • Loading branch information
Victoria Phelps committed Mar 17, 2023
1 parent 54ad134 commit 8b8d25a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/components/units/AppGameBodyHeaderOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,19 @@
if (isPuzzleGame.value) {
updatedPlayerId.value = currentPlayerId.value[0] === "p" ? "c1" : "p1";
} else {
updatedLeftPlayerId.value = "";
updatedRightPlayerId.value = "";
if (updatedMatchType.value === "pvp") {
updatedLeftPlayerId.value = "p1";
updatedRightPlayerId.value = "p2";
} else if (updatedMatchType.value === "pvc") {
updatedLeftPlayerId.value = "p1";
updatedRightPlayerId.value = "c1";
} else if (updatedMatchType.value === "cvp") {
updatedLeftPlayerId.value = "c1";
updatedRightPlayerId.value = "p1";
} else if (updatedMatchType.value === "cvc") {
updatedLeftPlayerId.value = "c1";
updatedRightPlayerId.value = "c2";
}
}
}
}
Expand Down

0 comments on commit 8b8d25a

Please sign in to comment.