|
|
@ -34,7 +34,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
|
|
import { faUser, faUsers, faTractor, faWindowRestore,
|
|
|
|
import { faUser, faUsers, faTractor, faWindowRestore,
|
|
|
|
faDollarSign, faTimes, faExchangeAlt,
|
|
|
|
faDollarSign, faTimes, faExchangeAlt,
|
|
|
|
faInfoCircle, faArrowUp, faArrowDown, faAward,
|
|
|
|
faInfoCircle, faArrowUp, faArrowDown, faAward,
|
|
|
|
faBan, faArrowCircleLeft, faPlusCircle } from '@fortawesome/free-solid-svg-icons'
|
|
|
|
faBan, faArrowCircleLeft, faPlusCircle, faBirthdayCake } from '@fortawesome/free-solid-svg-icons'
|
|
|
|
|
|
|
|
|
|
|
|
import { GroupBox, Row, Col, Button } from '../widgets.jsx'
|
|
|
|
import { GroupBox, Row, Col, Button } from '../widgets.jsx'
|
|
|
|
import SpaceNode from './SpaceNode.jsx'
|
|
|
|
import SpaceNode from './SpaceNode.jsx'
|
|
|
@ -49,7 +49,7 @@ import { buy, roll, endTurn, loan, trade, submitTradeAccept,
|
|
|
|
submitTradeDeny, submitTradeCancel, audit,
|
|
|
|
submitTradeDeny, submitTradeCancel, audit,
|
|
|
|
buyUncleBert, skip, endAiTurn, startGame, readyToStart,
|
|
|
|
buyUncleBert, skip, endAiTurn, startGame, readyToStart,
|
|
|
|
leaveGame, kickPlayer, toggleRevealForTrade,
|
|
|
|
leaveGame, kickPlayer, toggleRevealForTrade,
|
|
|
|
addAIPlayer } from './interface.js'
|
|
|
|
addAIPlayer, birthdayBonusPlayer } from './interface.js'
|
|
|
|
|
|
|
|
|
|
|
|
function netWorth(player) {
|
|
|
|
function netWorth(player) {
|
|
|
|
return ((player.assets.hay + player.assets.grain) * 2000) +
|
|
|
|
return ((player.assets.hay + player.assets.grain) * 2000) +
|
|
|
@ -121,10 +121,12 @@ class PlayerResources extends React.Component {
|
|
|
|
amount={player.assets.tractor}>
|
|
|
|
amount={player.assets.tractor}>
|
|
|
|
{player.assets.tractor}
|
|
|
|
{player.assets.tractor}
|
|
|
|
</ResourceUnit>{' '}
|
|
|
|
</ResourceUnit>{' '}
|
|
|
|
|
|
|
|
{player.assets.birthday ? (
|
|
|
|
<ResourceUnit img={CakeImg} h='240' s='100' label='Birthday'
|
|
|
|
<ResourceUnit img={CakeImg} h='240' s='100' label='Birthday'
|
|
|
|
amount={player.assets.birthday ? player.assets.birthday : 0}>
|
|
|
|
amount={player.assets.birthday ? player.assets.birthday : 0}>
|
|
|
|
{player.assets.birthday ? player.assets.birthday : 0}
|
|
|
|
{player.assets.birthday ? player.assets.birthday : 0}
|
|
|
|
</ResourceUnit>
|
|
|
|
</ResourceUnit>
|
|
|
|
|
|
|
|
) : (<></>)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1924,6 +1926,10 @@ const StartGame = ({ game, player, toggleReady }) => {
|
|
|
|
const playerName = player.name;
|
|
|
|
const playerName = player.name;
|
|
|
|
const { color } = player;
|
|
|
|
const { color } = player;
|
|
|
|
const { name, host } = game;
|
|
|
|
const { name, host } = game;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const birthdayClass = (player) =>
|
|
|
|
|
|
|
|
player.assets.birthday ? 'birthday-selected' : '';
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<h1>Lobby</h1>
|
|
|
|
<h1>Lobby</h1>
|
|
|
@ -1932,14 +1938,26 @@ const StartGame = ({ game, player, toggleReady }) => {
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<h3>Players</h3>
|
|
|
|
<h3>Players</h3>
|
|
|
|
<ul>
|
|
|
|
<ul>
|
|
|
|
<li><PlayerColorIcon color={color} /> {playerName}</li>
|
|
|
|
<li>
|
|
|
|
|
|
|
|
<PlayerColorIcon color={color} /> {playerName}
|
|
|
|
|
|
|
|
{playerName === host ? (
|
|
|
|
|
|
|
|
<span title="Birthday Bonus" className={'lobby-icon ' + birthdayClass(player)} onClick={() => birthdayBonusPlayer(playerName)}>
|
|
|
|
|
|
|
|
<FontAwesomeIcon icon={faBirthdayCake} />
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
) : (<></>)}
|
|
|
|
|
|
|
|
</li>
|
|
|
|
{game.otherPlayers.map((p, i) => (
|
|
|
|
{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="lobby-icon kick-player" onClick={() => kickPlayer(p.player.name)}>
|
|
|
|
<FontAwesomeIcon icon={faBan} />
|
|
|
|
<FontAwesomeIcon icon={faBan} />
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span title="Birthday Bonus" className={"lobby-icon " + birthdayClass(p.player)} onClick={() => birthdayBonusPlayer(p.player.name)}>
|
|
|
|
|
|
|
|
<FontAwesomeIcon icon={faBirthdayCake} />
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</>
|
|
|
|
): (<></>)}
|
|
|
|
): (<></>)}
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|