70 lines
2.5 KiB
Plaintext
70 lines
2.5 KiB
Plaintext
{/* Show player controls if player is owned by current_user */}
|
|
{(this.props.soft_token == this.props.game.current_user_soft_token) && (this.props.game.is_started == true)
|
|
? (<PlayerControls
|
|
key={this.props.id}
|
|
onPlayHandSubmit={this.props.onPlayHandSubmit}
|
|
game_id={this.props.game.id}
|
|
player_id={this.props.id}
|
|
inventory={this.props.inventory}
|
|
controlling_player_id={this.props.game.controlling_player_id} /> )
|
|
:
|
|
<div className='inventory'>
|
|
{[...Array(this.props.inventory_count)].map((card, index) => <img key={index} src='/assets/cards/png/back-pink.png' />)}
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Player
|
|
game={this.props.game}
|
|
onPlayHandSubmit={this.props.onPlayHandSubmit}
|
|
{...this.props.player} />
|
|
: "Empty" }
|
|
</div>
|
|
|
|
|
|
<Seat
|
|
{...this.props.game.seats[0]}
|
|
game={this.props.game}
|
|
onPlayHandSubmit={this.props.onPlayHandSubmit}
|
|
current_user={this.props.current_user}
|
|
onSeatSubmit={this.props.onSeatSubmit} />
|
|
</div>
|
|
</div>
|
|
<div id="mid">
|
|
<div className="game-seat position-2">
|
|
<Seat
|
|
{...this.props.game.seats[1]}
|
|
game={this.props.game}
|
|
onPlayHandSubmit={this.props.onPlayHandSubmit}
|
|
current_user={this.props.current_user}
|
|
onSeatSubmit={this.props.onSeatSubmit} />
|
|
</div>
|
|
<HandToBeat cards={this.props.game.cards_to_beat} />
|
|
<div className="game-seat position-3">
|
|
<Seat
|
|
{...this.props.game.seats[2]}
|
|
game={this.props.game}
|
|
onPlayHandSubmit={this.props.onPlayHandSubmit}
|
|
current_user={this.props.current_user}
|
|
onSeatSubmit={this.props.onSeatSubmit} />
|
|
</div>
|
|
</div>
|
|
<div id="bot">
|
|
<div className="game-seat position-4">
|
|
<Seat
|
|
{...this.props.game.seats[3]}
|
|
game={this.props.game}
|
|
onPlayHandSubmit={this.props.onPlayHandSubmit}
|
|
current_user={this.props.current_user}
|
|
onSeatSubmit={this.props.onSeatSubmit} />
|
|
</div>
|
|
</div>
|
|
</div>
|