calculatePoints = (rounds) => {
let pts = 0;
rounds.forEach(([opponentChoice, desiredOutcome]) => {
if (desiredOutcome === "X") {
pts += 0;
if (opponentChoice === "A") {
pts += 3;
} else if (opponentChoice === "B") {
pts += 1;
} else if (opponentChoice === "C") {
pts += 2;
}
} else if (desiredOutcome === "Y") {
pts += 3;
if (opponentChoice === "A") {
pts += 1;
} else if (opponentChoice === "B") {
pts += 2;
} else if (opponentChoice === "C") {
pts += 3;
}
} else if (desiredOutcome === "Z") {
pts += 6;
if (opponentChoice === "A") {
pts += 2;
} else if (opponentChoice === "B") {
pts += 3;
} else if (opponentChoice === "C") {
pts += 1;
}
}
});
return pts;
}