Add initial-placement guides to Activities
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
8170189400
commit
1ccb6384de
@ -64,8 +64,10 @@ const Activities = ({ table }) => {
|
||||
isTurn = (game.turn && game.turn.color === game.color) ? true : false,
|
||||
normalPlay = (game.state === 'initial-placement' || game.state === 'normal'),
|
||||
mustDiscard = game.player ? parseInt(game.player.mustDiscard ? game.player.mustDiscard : 0) : 0,
|
||||
mustPlaceRobber = (game.turn && !game.turn.placedRobber && game.turn.robberInAction);
|
||||
|
||||
mustPlaceRobber = (game.turn && !game.turn.placedRobber && game.turn.robberInAction),
|
||||
isInitialPlacement = (game.state == 'initial-placement'),
|
||||
placeRoad = isInitialPlacement && game.turn && game.turn.actions.indexOf('place-road') !== -1;
|
||||
|
||||
const list = game.activities
|
||||
.filter(activity => game.timestamp - activity.date < 11000)
|
||||
.map(activity => {
|
||||
@ -87,6 +89,10 @@ const Activities = ({ table }) => {
|
||||
<div className="Requirement">You must discard <b>{mustDiscard}</b> cards.</div>
|
||||
}
|
||||
|
||||
{ isTurn && isInitialPlacement &&
|
||||
<div className="Requirement">You must place a {placeRoad ? 'road' : 'settlement'}.</div>
|
||||
}
|
||||
|
||||
{ !isTurn && normalPlay &&
|
||||
<div>It is <PlayerColor color={table.game.turn.color}/> {table.game.turn.name}'s turn.</div>
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user