Hide first player and simplify background.
Hide the first player information before the game starts in the Northcott's game interactive. Also, simplify the background.
This commit is contained in:
parent
a384562f9f
commit
e6f60d6cbf
1 changed files with 9 additions and 3 deletions
|
|
@ -307,8 +307,8 @@ const NorthcottsGame: React.FC<NorthcottsGameProps> = ({ showSocialShare = false
|
||||||
};
|
};
|
||||||
|
|
||||||
const currentPlayerColor = gameState.currentPlayer === 'L' ? 'blue' : 'red';
|
const currentPlayerColor = gameState.currentPlayer === 'L' ? 'blue' : 'red';
|
||||||
const bgClass = gameState.currentPlayer === 'L' ? 'bg-blue-50' : 'bg-red-50';
|
const bgClass = gameState.gameStarted ? (gameState.currentPlayer === 'L' ? 'bg-blue-50' : 'bg-red-50') : 'bg-background';
|
||||||
const borderClass = gameState.currentPlayer === 'L' ? 'border-blue-600' : 'border-red-900';
|
const borderClass = gameState.gameStarted ? (gameState.currentPlayer === 'L' ? 'border-blue-600' : 'border-red-900') : 'border-border';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
|
|
@ -398,7 +398,7 @@ const NorthcottsGame: React.FC<NorthcottsGameProps> = ({ showSocialShare = false
|
||||||
{gameState.misereMode ? 'Last to move loses (Misère)' : 'Last to move wins (Normal)'}
|
{gameState.misereMode ? 'Last to move loses (Misère)' : 'Last to move wins (Normal)'}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : gameState.gameStarted ? (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Badge variant="secondary" className="text-lg py-1 px-4">
|
<Badge variant="secondary" className="text-lg py-1 px-4">
|
||||||
Current Player: {gameState.currentPlayer} ({gameState.currentPlayer === 'L' ? 'Blue' : 'Red'})
|
Current Player: {gameState.currentPlayer} ({gameState.currentPlayer === 'L' ? 'Blue' : 'Red'})
|
||||||
|
|
@ -407,6 +407,12 @@ const NorthcottsGame: React.FC<NorthcottsGameProps> = ({ showSocialShare = false
|
||||||
{gameState.misereMode ? 'Misère Mode: Last to move loses' : 'Normal Mode: Last to move wins'}
|
{gameState.misereMode ? 'Misère Mode: Last to move loses' : 'Normal Mode: Last to move wins'}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="space-y-2">
|
||||||
|
<p className="text-sm text-muted-foreground">
|
||||||
|
{gameState.misereMode ? 'Misère Mode: Last to move loses' : 'Normal Mode: Last to move wins'}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue