1
0

Fix bug with free road playing more than 2 cards

This commit is contained in:
James Ketr 2025-10-11 13:25:25 -07:00
parent 419b36c22f
commit c4e35ac3ae
2 changed files with 3 additions and 3 deletions

View File

@ -120,11 +120,11 @@ const Hand: React.FC<HandProps> = ({ buildActive, setBuildActive, setCardActive
}
return B.turn - A.turn; /* Put playable cards on top */
})
.map((card: any) => (
.map((card: any, idx: number) => (
<Development
onClick={() => cardClicked(card)}
card={card}
key={`${type}-${card.card}`}
key={`${type}-${card.card}-${card.turn ?? "t"}-${idx}`}
type={`${type}-${card.card}`}
/>
));

View File

@ -2863,7 +2863,7 @@ const placeRoad = (game: Game, session: Session, index: number): string | undefi
delete (game.turn as any).active;
delete (game.turn as any).freeRoads;
addActivity(game, session, `${session.name} has another road to play, but there are no more valid locations.`);
} else if ((game.turn as any).freeRoads !== 0) {
} else if ((game.turn as any).freeRoads > 0) {
(game.turn as any).free = true;
setForRoadPlacement(game, roads);
resetLimits = false;