1
0

Updated Volcano for legibility

Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
James Ketrenos 2022-06-04 09:42:40 -07:00
parent f6f76388b2
commit a64c5afb20
3 changed files with 13 additions and 6 deletions

View File

@ -41,6 +41,11 @@
transform: translate(-50%, -50%);
}
.Pip.Volcano {
margin-left: -8px;
transform: scale(0.5);
}
.Pip.Option {
filter: brightness(150%);
}

View File

@ -416,7 +416,7 @@ const Board = () => {
return;
}
console.log(`board - Generate pip, border, and tile elements`);
const Pip = ({pip}) => {
const Pip = ({pip, className}) => {
const onPipClicked = (pip) => {
if (!ws) { console.error(`board - sendPlacement - ws is NULL`); return; }
ws.send(JSON.stringify({
@ -424,7 +424,7 @@ const Board = () => {
}));
};
return <div className="Pip"
return <div className={`Pip ${className}`}
onClick={() => { onPipClicked(pip) }}
data-roll={pip.roll}
data-index={pip.index}
@ -445,6 +445,7 @@ const Board = () => {
let index = 0;
let pip;
return pipOrder.map(order => {
let volcano = false;
pip = {
roll: pips[order].roll,
index: index++,
@ -458,8 +459,9 @@ const Board = () => {
pip.order = pips.findIndex(
pip => pip.roll === rules[`volcano`].number);
pip.roll = rules[`volcano`].number;
volcano = true;
}
const div = <Pip
const div = <Pip className={volcano ? "Volcano" : ""}
pip={pip}
key={`pip-${order}`}
/>;

View File

@ -212,9 +212,9 @@ const HouseRules = ({ houseRulesActive, setHouseRulesActive }) => {
setRuleElements([{
title: `Why you play so slow?`,
key: `slowest-turn`,
description: `The player with the slowest turn so far receives -2VP.`,
element: <Placard type="slowest-turn"/>,
implemented: false
description: `The player with the longest turn so far receives -2VP.`,
element: <Placard type="longest-turn"/>,
implemented: true
}, {
title: `More victory points`,
key: `victory-points`,