Fix bug with free road playing more than 2 cards
This commit is contained in:
parent
419b36c22f
commit
c4e35ac3ae
@ -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}`}
|
||||
/>
|
||||
));
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user