Default player colors alignmnet

This commit is contained in:
djmil 2023-11-17 20:48:22 +01:00
parent b6146eed6b
commit 9b0a3753aa
3 changed files with 7 additions and 6 deletions

View File

@ -1,5 +1,6 @@
.Stone { .Stone {
cursor: default; /* disable 'I beam' cursor change */ cursor: default; /* disable 'I beam' cursor change */
user-select: none;
} }
.Board { .Board {

View File

@ -51,9 +51,9 @@ export default function GameBoard({ username, onNewGameBoardStone, onActiveGameM
return ( return (
<div className='GameBoard'> <div className='GameBoard'>
<Player color={opponentColor || Color.white} name={opponentName} /> <Player color={opponentColor || Color.black} name={opponentName} />
<Board game={game} onClick={optionalOnClick} /> <Board game={game} onClick={optionalOnClick} />
<Player color={game?.myColor || Color.black} name={myName} /> <Player color={game?.myColor || Color.white} name={myName} />
</div> </div>
) )
} }

View File

@ -46,11 +46,11 @@ export default function NewGame({ players, setOpponent }) {
return ( return (
<div className='NewGame'> <div className='NewGame'>
<WhiteStone />
<DropdownList selected={whitePlayer} onSelect={(name) => onSelect(name, Color.white)} optionsList={whiteOptions} />
<i>- vs -</i>
<DropdownList selected={blackPlayer} onSelect={(name) => onSelect(name, Color.black)} optionsList={blackOptions} />
<BlackStone /> <BlackStone />
<DropdownList selected={blackPlayer} onSelect={(name) => onSelect(name, Color.black)} optionsList={blackOptions} />
<i>- vs -</i>
<DropdownList selected={whitePlayer} onSelect={(name) => onSelect(name, Color.white)} optionsList={whiteOptions} />
<WhiteStone />
</div> </div>
) )
} }