|
|
@ -191,48 +191,55 @@ class ResourceUnit extends React.Component {
|
|
|
|
class PlayerTradeResources extends React.Component {
|
|
|
|
class PlayerTradeResources extends React.Component {
|
|
|
|
render () {
|
|
|
|
render () {
|
|
|
|
let player = this.props.player;
|
|
|
|
let player = this.props.player;
|
|
|
|
return (<form onSubmit={e => tradeFormSubmit(e, player)}>
|
|
|
|
return (
|
|
|
|
<div className='player-trade-resources'>
|
|
|
|
<form onSubmit={e => tradeFormSubmit(e, player)}>
|
|
|
|
<ResourceUnit h='120' s='100' label='acres of Hay' amount={''}>
|
|
|
|
<div className='player-trade-resources'>
|
|
|
|
<input type='number' id='trade-hay' defaultValue='0' /></ResourceUnit> {' '}
|
|
|
|
<ResourceUnit img={HayImg} h='120' s='100' label='acres of Hay' amount={''}>
|
|
|
|
<ResourceUnit h='41' s='100' label='acres of Grain' amount={''}>
|
|
|
|
<input type='number' id='trade-hay' defaultValue='0' />
|
|
|
|
<input type='number' id='trade-grain' defaultValue='0' /></ResourceUnit> {' '}
|
|
|
|
</ResourceUnit> {' '}
|
|
|
|
<ResourceUnit h='0' s='100' label='acres of Fruit' amount={''}>
|
|
|
|
<ResourceUnit img={WheatImg} h='41' s='100' label='acres of Grain' amount={''}>
|
|
|
|
<input type='number' id='trade-fruit' defaultValue='0' /></ResourceUnit> {' '}
|
|
|
|
<input type='number' id='trade-grain' defaultValue='0' />
|
|
|
|
<ResourceUnit h='0' s='59' label='head of Cows' amount={''}>
|
|
|
|
</ResourceUnit> {' '}
|
|
|
|
<input type='number' id='trade-cows' defaultValue='0' /></ResourceUnit> {' '}
|
|
|
|
<ResourceUnit img={FruitImg} h='0' s='100' label='acres of Fruit' amount={''}>
|
|
|
|
<ResourceUnit h='240' s='100' label='Harvesters' amount={''}>
|
|
|
|
<input type='number' id='trade-fruit' defaultValue='0' />
|
|
|
|
<input type='number' id='trade-harvesters' defaultValue='0' /></ResourceUnit> {' '}
|
|
|
|
</ResourceUnit> {' '}
|
|
|
|
<ResourceUnit h='240' s='100' label='Tractors' amount={''}>
|
|
|
|
<ResourceUnit img={CowImg} h='0' s='59' label='head of Cows' amount={''}>
|
|
|
|
<input type='number' id='trade-tractors' defaultValue='0' /></ResourceUnit>
|
|
|
|
<input type='number' id='trade-cows' defaultValue='0' />
|
|
|
|
<br /><br />
|
|
|
|
</ResourceUnit> {' '}
|
|
|
|
<b>Ridges</b>: <b>{ridgeNames[0][0]}</b>: <input type='checkbox' id='trade-ridge1' />{'\u00A0'}
|
|
|
|
<ResourceUnit img={HarvesterImg} h='240' s='100' label='Harvesters' amount={''}>
|
|
|
|
<b>R</b>: <input type='checkbox' id='trade-ridge2' />{'\u00A0'}
|
|
|
|
<input type='number' id='trade-harvesters' defaultValue='0' />
|
|
|
|
<b>C</b>: <input type='checkbox' id='trade-ridge3' />{'\u00A0'}
|
|
|
|
</ResourceUnit> {' '}
|
|
|
|
<b>T</b>: <input type='checkbox' id='trade-ridge4' />{'\u00A0'}
|
|
|
|
<ResourceUnit img={TractorImg} h='240' s='100' label='Tractors' amount={''}>
|
|
|
|
<br /><br />
|
|
|
|
<input type='number' id='trade-tractors' defaultValue='0' />
|
|
|
|
<Row>
|
|
|
|
</ResourceUnit>
|
|
|
|
<Col width='4 column-no-padding'>
|
|
|
|
<br />
|
|
|
|
<label htmlFor='trade-player'><b>Player</b>:</label>
|
|
|
|
<b>Ridges</b>: <b>{ridgeNames[0][0]}</b>: <input type='checkbox' id='trade-ridge1' />{'\u00A0'}
|
|
|
|
<select id='trade-player'>
|
|
|
|
<b>R</b>: <input type='checkbox' id='trade-ridge2' />{'\u00A0'}
|
|
|
|
{this.props.otherPlayers.map(p => (
|
|
|
|
<b>C</b>: <input type='checkbox' id='trade-ridge3' />{'\u00A0'}
|
|
|
|
<option key={p.player.name} value={p.player.name}>{p.player.name}</option>
|
|
|
|
<b>T</b>: <input type='checkbox' id='trade-ridge4' />{'\u00A0'}
|
|
|
|
))}
|
|
|
|
<br /><br />
|
|
|
|
</select>
|
|
|
|
<Row>
|
|
|
|
</Col>
|
|
|
|
<Col width='4 column-no-padding'>
|
|
|
|
<Col width='4 column-no-padding'>
|
|
|
|
<label htmlFor='trade-player'><b>Player</b>:</label>
|
|
|
|
<label htmlFor='trade-money'><b>Money</b>: </label>
|
|
|
|
<select id='trade-player'>
|
|
|
|
<input type='number' id='trade-money' defaultValue='0' />
|
|
|
|
{this.props.otherPlayers.map(p => (
|
|
|
|
</Col>
|
|
|
|
<option key={p.player.name} value={p.player.name}>{p.player.name}</option>
|
|
|
|
<Col width='4 column-no-padding'>
|
|
|
|
))}
|
|
|
|
<label htmlFor='trade-cards'><b>Cards</b>: </label>
|
|
|
|
</select>
|
|
|
|
<input type='text' id='trade-cards' />
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
<Col width='4 column-no-padding'>
|
|
|
|
</Row>
|
|
|
|
<label htmlFor='trade-money'><b>Money</b>: </label>
|
|
|
|
<PlayerTradeProposed player={this.props.player} />
|
|
|
|
<input type='number' id='trade-money' defaultValue='0' />
|
|
|
|
<PlayerTradeButton player={this.props.player} />
|
|
|
|
</Col>
|
|
|
|
</div>
|
|
|
|
<Col width='4 column-no-padding'>
|
|
|
|
</form>);
|
|
|
|
<label htmlFor='trade-cards'><b>Cards</b>: </label>
|
|
|
|
|
|
|
|
<input type='text' id='trade-cards' placeholder="12 46" />
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
<PlayerTradeProposed player={this.props.player} />
|
|
|
|
|
|
|
|
<PlayerTradeButton player={this.props.player} />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|