Changeset aac3b2b for components
- Timestamp:
- 07/07/22 23:53:57 (2 years ago)
- Branches:
- main
- Children:
- 95ce58b
- Parents:
- 189cd8f
- Location:
- components/poker/sections
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
components/poker/sections/Messages.jsx
r189cd8f raac3b2b 24 24 return ( 25 25 <div className="pokerMessagesContainer"> 26 { playerState.pokerGame.table.started && playerState.pokerGame.table.ended && playerState.pokerGame.table.winners.length === 1 && <p>Game over - {playerState.pokerGame.table.winners[0]?.displayName} won ${playerState.pokerGame.table.winners[0]?.wonAmount} with a {playerState.pokerGame.table.winners[0]?.hand?.hand} combination! Congratulations.</p> } 27 { playerState.pokerGame.table.started && playerState.pokerGame.table.ended && playerState.pokerGame.table.winners.length > 1 && <p>Game over - {playerState.pokerGame.table.winners.map(e=>e.displayName).join(", ")} drew!</p> } 28 { playerState.pokerGame.table.started && playerState.pokerGame.table.ended && <p>New game will start soon.</p> } 26 { playerState.pokerGame.table.ended && playerState.pokerGame.table.onlyOnePlayerLeft && <p>Game over - {playerState.pokerGame.table.winners[0]?.displayName} won ${playerState.pokerGame.table.winners[0]?.wonAmount} because everyone else folded! Congratulations.</p> } 27 { playerState.pokerGame.table.ended && !playerState.pokerGame.table.onlyOnePlayerLeft && playerState.pokerGame.table.winners.length === 1 && <p>Game over - {playerState.pokerGame.table.winners[0]?.displayName} won ${playerState.pokerGame.table.winners[0]?.wonAmount} with a {playerState.pokerGame.table.winners[0]?.hand?.hand} combination! Congratulations.</p> } 28 { playerState.pokerGame.table.ended && playerState.pokerGame.table.winners.length > 1 && <p>Game over - {playerState.pokerGame.table.winners.map(e=>e.displayName).join(", ")} drew!</p> } 29 { playerState.pokerGame.table.ended && <p>New game will start soon.</p> } 29 30 30 31 { playerState.pokerGame.table.started && !playerState.pokerGame.table.ended && <p>Round {playerState.pokerGame.table.round}/4{roundMessage}</p> } 31 { !playerState.pokerGame.table.started && <p>Waiting for coordinator {playerState.pokerGame.table.creator} to start the game.</p> }32 { !playerState.pokerGame.table.started && !playerState.pokerGame.table.ended && <p>Waiting for coordinator {playerState.pokerGame.table.creator} to start the game.</p> } 32 33 { playerState.pokerGame.table.started && !playerState.pokerGame.table.ended && <p>{turnMessage}</p> } 33 34 { playerState.pokerGame.table.started && !playerState.pokerGame.table.ended && <p>{callMessage}</p> } -
components/poker/sections/PickATable.jsx
r189cd8f raac3b2b 49 49 <h3>Pick a table:</h3> 50 50 <div onClick={(e) => joinATable(e)}> 51 {playerState.pokerGame.tables. map(table => (51 {playerState.pokerGame.tables.filter(table=>table.started===false).map(table => ( 52 52 <div data-table={table.id} key={table.id}> 53 53 <p data-table={table.id}>Table name: {table.name}</p> 54 54 <p data-table={table.id}>Creator: {table.creator}</p> 55 <p data-table={table.id}>Players: {table.players. length}/8</p>55 <p data-table={table.id}>Players: {table.players.filter(e=>e.isGhost===false).length}/8</p> 56 56 <p data-table={table.id}>Join</p> 57 57 </div> -
components/poker/sections/PlayButtons.jsx
r189cd8f raac3b2b 60 60 return ( 61 61 <div className="pokerPlayButtonsContainer"> 62 {!playerState.pokerGame.table.started && playerState.pokerGame.player.isCoordinator && playerState.pokerGame.player.isSatDown && <button className="secondaryButton" onClick={() => startGame()}>Start game</button>}62 {!playerState.pokerGame.table.started && !playerState.pokerGame.table.ended && playerState.pokerGame.player.isCoordinator && playerState.pokerGame.player.isSatDown && <button className="secondaryButton" onClick={() => startGame()}>Start game</button>} 63 63 {!playerState.pokerGame.table.started && !playerState.pokerGame.player.isSatDown && <button className="secondaryButton" onClick={() => sitDown()}>Take a seat</button>} 64 64 </div>
Note:
See TracChangeset
for help on using the changeset viewer.