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