function removeGoat(doors, contestantChoice) {
const possibleIndices = doors.filter((_, i) => i !== contestantChoice && doors[i] === 'goat').map((_, i) => i);
const indexToRemove = possibleIndices[rndIdx(possibleIndices.length)];
const shiftedContestantChoice = contestantChoice > indexToRemove ? contestantChoice - 1 : contestantChoice;
return {
doors: doors.filter((_, i) => i !== indexToRemove),
contestantChoice: shiftedContestantChoice
}
}