Skip to content

Commit 8af3b27

Browse files
committed
fix(game): bot cards are not obscured
1 parent 3c995dc commit 8af3b27

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/components/ActiveGame.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,15 @@ export default function ActiveGame({ game, playerId, handleAction }: Props) {
199199
.sort((a, b) => a.index - b.index)
200200
.map((player) => (
201201
<Box key={player.index}>
202+
{/* For solo games, manually obscure opponent hand. */}
202203
{(spectating || player.index !== thisPlayer?.index) && (
203204
<OpponentHand
204205
position={indexToPosition(player.index)}
205-
player={player}
206+
player={
207+
game.id !== SOLO_GAME_ID
208+
? player
209+
: { ...player, hand: player.hand.map(() => '') }
210+
}
206211
roundLeaderIndex={roundLeaderIndex}
207212
/>
208213
)}
@@ -367,7 +372,9 @@ export default function ActiveGame({ game, playerId, handleAction }: Props) {
367372
key={card + cardIndex}
368373
style={overlapStyles(cardIndex, cardSpacing)}
369374
>
370-
<CardImage card={card} />
375+
<CardImage
376+
card={game.id !== SOLO_GAME_ID ? card : ''}
377+
/>
371378
</Box>
372379
))}
373380
</Stack>

0 commit comments

Comments
 (0)