Adding webpack dev server support.
This commit is contained in:
@@ -120,18 +120,16 @@ class PlayerResources extends React.Component {
|
||||
<ResourceUnit img={TractorImg} h='240' s='100' label='Tractors'
|
||||
amount={player.assets.tractor}>
|
||||
{player.assets.tractor}
|
||||
</ResourceUnit>{' '}
|
||||
<ResourceUnit img={CakeImg} h='240' s='100' label='Birthday'
|
||||
amount={player.assets.birthday ? player.assets.birthday : 0}>
|
||||
{player.assets.birthday ? player.assets.birthday : 0}
|
||||
</ResourceUnit>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/* {' '}
|
||||
* <ResourceUnit img={CakeImg} h='240' s='100' label='Birthday'
|
||||
* amount={player.assets.birthday ? player.assets.birthday : 0}>
|
||||
* {player.assets.birthday ? player.assets.birthday : 0}
|
||||
* </ResourceUnit> */
|
||||
|
||||
// http://stackoverflow.com/questions/149055
|
||||
function formatMoney(n) {
|
||||
return n.toFixed(1).replace(/(\d)(?=(\d{3})+\.)/g, '$1,').slice(0, -2); }
|
||||
@@ -1813,21 +1811,23 @@ class AlertOverlay extends React.Component {
|
||||
<FontAwesomeIcon icon={faTimes} />
|
||||
</div>
|
||||
) : (<></>)}
|
||||
<div className='alert-overlay-contents'>
|
||||
{this.props.children}
|
||||
<br />
|
||||
<div>
|
||||
<Button onClick={this.buttonClick} disabled={!!this.props.disabled}>{this.props.buttonText}</Button>
|
||||
{this.props.cancelButtonText ? (
|
||||
<>
|
||||
{' '}
|
||||
<Button onClick={this.cancelButtonClick} disabled={!!this.props.cancelDisabled}>
|
||||
{this.props.cancelButtonText}
|
||||
</Button>
|
||||
</>
|
||||
): (<></>)}
|
||||
<div className='alert-container'>
|
||||
<div className='alert-overlay-contents'>
|
||||
{this.props.children}
|
||||
<br />
|
||||
<div>
|
||||
<Button onClick={this.buttonClick} disabled={!!this.props.disabled}>{this.props.buttonText}</Button>
|
||||
{this.props.cancelButtonText ? (
|
||||
<>
|
||||
{' '}
|
||||
<Button onClick={this.cancelButtonClick} disabled={!!this.props.cancelDisabled}>
|
||||
{this.props.cancelButtonText}
|
||||
</Button>
|
||||
</>
|
||||
): (<></>)}
|
||||
</div>
|
||||
{!this.props.preventHiding ? (<a onClick={this.hide}>close</a>) : (<></>)}
|
||||
</div>
|
||||
{!this.props.preventHiding ? (<a onClick={this.hide}>close</a>) : (<></>)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -2110,7 +2110,7 @@ class BoardApp extends React.Component {
|
||||
buttonText='Close'
|
||||
hideHandler={() => 'nothing'}
|
||||
handler={() => { return false; }}>
|
||||
<Fragment>
|
||||
<div className="game-over">
|
||||
<h1>Game Over!</h1>
|
||||
{alert.contents.results.map((e, i) => (
|
||||
<p key={i}>{e}</p>
|
||||
@@ -2121,7 +2121,14 @@ class BoardApp extends React.Component {
|
||||
<p>{alert.contents.stats.emergency}</p>
|
||||
<p>{alert.contents.stats.highRoller}</p>
|
||||
<p>{alert.contents.stats.lowRoller}</p>
|
||||
</Fragment>
|
||||
{alert.contents.stats.players.map(p => (
|
||||
<div key={p.name}>
|
||||
<p><b>{p.name} Harvests:</b></p>
|
||||
<p>Total: ${formatMoney(p.harvestTotal)} Expenses: ${formatMoney(Math.abs(p.operatingExpenses))}</p>
|
||||
<p>Avg ${formatMoney(p.harvestAverage)} rolling {p.harvestRoll} for {p.numHarvests} harvests</p>
|
||||
<p>Hay: ${formatMoney(p.hay)} Grain: ${formatMoney(p.grain)} Fruit: ${formatMoney(p.fruit)} Cows: ${formatMoney(p.cows)}</p>
|
||||
</div>))}
|
||||
</div>
|
||||
</AlertOverlay>
|
||||
);
|
||||
} else if (alert && alert.type === ALERTS.auditCalled) {
|
||||
|
||||
Reference in New Issue
Block a user