{ name !== "" && volume !== undefined &&
+ Audio effects
{
+ const value = !audio;
+ localStorage.setItem('audio', value);
+ setAudio(value)
+ }}/>
Sound effects volume
{
@@ -488,7 +499,13 @@ const Table = () => {
localStorage.setItem('volume', alpha);
setVolume(alpha);
}}/>
- }
+
Animations
{
+ const value = !animations;
+ localStorage.setItem('animations', value);
+ setAnimations(value)
+ }} />
+ }
{ name !== "" &&
}
{ name !== "" &&
}
diff --git a/client/src/Board.js b/client/src/Board.js
index 8e72a00..5f2bb9e 100644
--- a/client/src/Board.js
+++ b/client/src/Board.js
@@ -34,7 +34,7 @@ const clearTooltip = () => {
document.querySelector('.Board .Tooltip').style.display = 'none';
};
-const Board = () => {
+const Board = ({ animations }) => {
const { ws } = useContext(GlobalContext);
const board = useRef();
const [transform, setTransform] = useState(1.);
@@ -554,24 +554,27 @@ const Board = () => {
if (tile.type === 'wheat') {
div =
+ { animations &&
;
- } else if (tile.type === 'sheep') {
- div =
- }
;
+ } else if (tile.type === 'sheep') {
+ div =
+ { animations &&
+
+ }
;
} else {
@@ -696,7 +699,7 @@ const Board = () => {
signature, generated,
pips, pipOrder, borders, borderOrder, tiles, tileOrder,
animationSeeds,
- ws, state, rules
+ ws, state, rules, animations
]);
/* Re-render turn info after every render */