AI UX improvements.

This commit is contained in:
2020-05-01 08:48:45 -07:00
parent 5609720876
commit 4cbfe0b394
2 changed files with 30 additions and 23 deletions

View File

@@ -1501,11 +1501,13 @@ class Harvest extends React.Component {
<div className={'flex ' + (currentExpense <= 0 ? 'red' : 'green')}>
<FontAwesomeIcon icon={faDollarSign} size='6x' />
<div>
<p>
{isCurrentPlayer ? 'You' : this.props.game.currentPlayer}
{currentExpense <= 0 ? ' lost ' : ' gained '}
${formatMoney(Math.abs(currentExpense))}!
</p>
{currentExpense ? (
<p>
{isCurrentPlayer ? 'You' : this.props.game.currentPlayer}
{currentExpense <= 0 ? ' lost ' : ' gained '}
${formatMoney(Math.abs(currentExpense))}!
</p>
) : (<></>)}
{Object.keys(this.props.expenseValue)
.filter(p => p !== this.props.game.currentPlayer)
.map((p, i) =>