|
|
@ -1919,54 +1919,52 @@ class Info extends React.Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class StartGame extends React.Component {
|
|
|
|
const StartGame = ({ game, player, toggleReady }) => {
|
|
|
|
render() {
|
|
|
|
const { auditThreshold, downPayment, loanInterest, maxDebt, startingOtbs, startingCash, startingDebt } = game.settings;
|
|
|
|
const { auditThreshold, downPayment, loanInterest, maxDebt, startingOtbs, startingCash, startingDebt } = this.props.game.settings;
|
|
|
|
const playerName = player.name;
|
|
|
|
const playerName = this.props.player.name;
|
|
|
|
const { color } = player;
|
|
|
|
const { color } = this.props.player;
|
|
|
|
const { name, host } = game;
|
|
|
|
const { name, host } = this.props.game;
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<h1>Lobby</h1>
|
|
|
|
<h1>Lobby</h1>
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
<b>Game</b>: {name}
|
|
|
|
<b>Game</b>: {name}
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<h3>Players</h3>
|
|
|
|
<h3>Players</h3>
|
|
|
|
<ul>
|
|
|
|
<ul>
|
|
|
|
<li><PlayerColorIcon color={color} /> {playerName}</li>
|
|
|
|
<li><PlayerColorIcon color={color} /> {playerName}</li>
|
|
|
|
{game.otherPlayers.map((p, i) => (
|
|
|
|
{this.props.game.otherPlayers.map((p, i) => (
|
|
|
|
<li key={i}>
|
|
|
|
<li key={i}>
|
|
|
|
<PlayerColorIcon color={p.player.color} /> {p.player.name}
|
|
|
|
<PlayerColorIcon color={p.player.color} /> {p.player.name}
|
|
|
|
{playerName === host ? (
|
|
|
|
{playerName === host ? (
|
|
|
|
<span title="Kick Player" className="kick-player" onClick={() => kickPlayer(p.player.name)}>
|
|
|
|
<span title="Kick Player" className="kick-player" onClick={() => kickPlayer(p.player.name)}>
|
|
|
|
<FontAwesomeIcon icon={faBan} />
|
|
|
|
<FontAwesomeIcon icon={faBan} />
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
): (<></>)}
|
|
|
|
): (<></>)}
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
))}
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
<span className="add-ai" onClick={addAIPlayer}>
|
|
|
|
|
|
|
|
<FontAwesomeIcon icon={faPlusCircle} />AI
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
))}
|
|
|
|
<h4>Game Settings</h4>
|
|
|
|
<li>
|
|
|
|
<ul>
|
|
|
|
<span className="add-ai" onClick={addAIPlayer}>
|
|
|
|
<li><b>Audit Threshold</b>: ${formatMoney(auditThreshold)}</li>
|
|
|
|
<FontAwesomeIcon icon={faPlusCircle} />AI
|
|
|
|
<li><b>Max Debt</b>: ${formatMoney(maxDebt)}</li>
|
|
|
|
</span>
|
|
|
|
<li><b>Loan Interest</b>: {loanInterest * 100}%</li>
|
|
|
|
</li>
|
|
|
|
<li><b>Required Down Payment</b>: {downPayment * 100}%</li>
|
|
|
|
</ul>
|
|
|
|
<li><b>Starting {itemCardShort}</b>: {startingOtbs}</li>
|
|
|
|
<h4>Game Settings</h4>
|
|
|
|
<li><b>Starting Cash</b>: ${formatMoney(startingCash)}</li>
|
|
|
|
<ul>
|
|
|
|
<li><b>Starting Debt</b>: ${formatMoney(startingDebt)}</li>
|
|
|
|
<li><b>Audit Threshold</b>: ${formatMoney(auditThreshold)}</li>
|
|
|
|
</ul>
|
|
|
|
<li><b>Max Debt</b>: ${formatMoney(maxDebt)}</li>
|
|
|
|
<label>
|
|
|
|
<li><b>Loan Interest</b>: {loanInterest * 100}%</li>
|
|
|
|
<input type="checkbox" onChange={this.props.toggleReady} />
|
|
|
|
<li><b>Required Down Payment</b>: {downPayment * 100}%</li>
|
|
|
|
Ready to start
|
|
|
|
<li><b>Starting {itemCardShort}</b>: {startingOtbs}</li>
|
|
|
|
</label>
|
|
|
|
<li><b>Starting Cash</b>: ${formatMoney(startingCash)}</li>
|
|
|
|
</>
|
|
|
|
<li><b>Starting Debt</b>: ${formatMoney(startingDebt)}</li>
|
|
|
|
);
|
|
|
|
</ul>
|
|
|
|
}
|
|
|
|
<label>
|
|
|
|
|
|
|
|
<input type="checkbox" onChange={toggleReady} />
|
|
|
|
|
|
|
|
Ready to start
|
|
|
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const SCREENS = { summary: 'summary', misc: 'misc', farms: 'farms',
|
|
|
|
const SCREENS = { summary: 'summary', misc: 'misc', farms: 'farms',
|
|
|
|