From a066a507efbb11533eba58a2e93dc07afda03a4f Mon Sep 17 00:00:00 2001 From: Thomas Hintz Date: Wed, 22 Apr 2020 21:35:54 -0700 Subject: [PATCH] Showing player color in lobby. --- src/components/farm/Board.jsx | 77 ++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/src/components/farm/Board.jsx b/src/components/farm/Board.jsx index 0fc2b01..c9e1ad2 100644 --- a/src/components/farm/Board.jsx +++ b/src/components/farm/Board.jsx @@ -52,17 +52,17 @@ import { buy, roll, endTurn, loan, trade, submitTradeAccept, function netWorth(player) { return ((player.assets.hay + player.assets.grain) * 2000) + - (player.assets.fruit * 5000) + - (player.assets.cows * 500) + - ((player.assets.harvester + player.assets.tractor) * 10000) + + (player.assets.fruit * 5000) + + (player.assets.cows * 500) + + ((player.assets.harvester + player.assets.tractor) * 10000) + player.displayCash - player.debt; } function assetsValue(player) { return ((player.assets.hay + player.assets.grain) * 2000) + - (player.assets.fruit * 5000) + - (player.assets.cows * 500) + - ((player.assets.harvester + player.assets.tractor) * 10000); + (player.assets.fruit * 5000) + + (player.assets.cows * 500) + + ((player.assets.harvester + player.assets.tractor) * 10000); } function getElementValue(id) { @@ -1541,36 +1541,36 @@ class Action extends React.Component { buttons = (); break; case 'farmers-fate': - view = ( -
- -
- -
- ); - buttons = (); - break; - case 'ff-uncle-bert': - const { cash } = this.props.player; - const ffButtons = ( - <> - {cash < 10000 ? ( - - ) : (<>)} -
- - - -
- - ); + view = ( +
+ +
+ +
+ ); + buttons = (); + break; + case 'ff-uncle-bert': + const { cash } = this.props.player; + const ffButtons = ( + <> + {cash < 10000 ? ( + + ) : (<>)} +
+ + + +
+ + ); view = (
@@ -1936,6 +1936,7 @@ 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 ( <> @@ -1945,10 +1946,10 @@ class StartGame extends React.Component {

Players

    -
  • {this.props.player.name}
  • +
  • {playerName}
  • {this.props.game.otherPlayers.map((p, i) => (
  • - {p.player.name} + {p.player.name} {playerName === host ? ( kickPlayer(p.player.name)}>