diff --git a/client/public/assets/solutions-all.png b/client/public/assets/solutions-all.png deleted file mode 100644 index cf0ab17..0000000 Binary files a/client/public/assets/solutions-all.png and /dev/null differ diff --git a/client/public/assets/solutions-compute.png b/client/public/assets/solutions-compute.png deleted file mode 100644 index ba8cb16..0000000 Binary files a/client/public/assets/solutions-compute.png and /dev/null differ diff --git a/client/public/assets/solutions-media.png b/client/public/assets/solutions-media.png deleted file mode 100644 index 9c16db8..0000000 Binary files a/client/public/assets/solutions-media.png and /dev/null differ diff --git a/client/public/assets/solutions-render.png b/client/public/assets/solutions-render.png deleted file mode 100644 index f192f49..0000000 Binary files a/client/public/assets/solutions-render.png and /dev/null differ diff --git a/client/src/Board.css b/client/src/Board.css index 886e418..35c75cf 100644 --- a/client/src/Board.css +++ b/client/src/Board.css @@ -125,27 +125,24 @@ .Option { cursor: pointer; pointer-events: all; -} - -.Option .Pip-Shape, -.Option .Tile-Shape, -.Option .Corner-Shape, -.Option .Road-Shape { - background-color: rgba(255, 255, 255, 0.5); + filter: brightness(150%); } .Robber .Pip-Shape, .Pip-Shape:hover { clip-path: circle(45%); /* show through the border */ + background-color:#e7c099; background-size: contain; - background-position: center; + background-position: center; background-image:url("./assets/woman-robber.png"); } .Tile-Shape:hover, .Corner-Shape:hover, .Road-Shape:hover { - background-color: white; +/* background-color: white;*/ + filter: brightness(150%); + } .Board .Selected { diff --git a/client/src/Board.js b/client/src/Board.js index e4cfae3..bb40a7b 100644 --- a/client/src/Board.js +++ b/client/src/Board.js @@ -92,7 +92,7 @@ const Board = ({ table, game }) => { return; }; - return
{ } if (game) { - let nodes = document.querySelectorAll(`.Pip .Robber`); + let nodes = document.querySelectorAll(`.Pip.Robber`); for (let i = 0; i < nodes.length; i++) { nodes[i].classList.remove('Robber'); } diff --git a/client/src/Table.css b/client/src/Table.css index 287182d..8873a54 100755 --- a/client/src/Table.css +++ b/client/src/Table.css @@ -8,6 +8,11 @@ background-image: url("./assets/tabletop.png"); } +.BottomBar { + display: flex; + margin-right: 40vw; + justify-content: space-between; +} .WaitingForPlayer { display: flex; @@ -126,8 +131,33 @@ transition: margin-left 1s ease-in-out 0.25s, margin-right 1s ease-in-out 0.25s; } +.Stack > *:not(:first-child) { + margin-left: -4.5em; +} + +.Hand:hover .Stack:hover > *:not(:first-child) { + /* margin-left: -2em; */ + } + +.Hand:hover .Stack:hover:not(:last-child) > *:last-child { +/* margin-right: 3em; */ +} + +.Hand { + display: flex; + min-height: calc(7.2em + 0.5em); +} + +.Hand > button { + align-self: center; + justify-self: center; +} + +.Placard:hover { + filter: brightness(105%); +} + .Development:hover, -.Placard:hover, .Resource:hover { filter: brightness(150%); } @@ -301,28 +331,6 @@ flex-grow: 1; } -.Stack > *:not(:first-child) { - margin-left: -4.5em; -} - -.Hand { - display: flex; - min-height: calc(7.2em + 0.5em); -} - -.Hand > button { - align-self: center; - justify-self: center; -} - -.Hand:hover .Stack:hover > *:not(:first-child) { - margin-left: -2em; -} - -.Hand:hover .Stack:hover:not(:last-child) > *:last-child { - margin-right: 3em; -} - .Placard { position: relative; width: 9.4em; diff --git a/client/src/Table.js b/client/src/Table.js index 94e3b67..abb241a 100755 --- a/client/src/Table.js +++ b/client/src/Table.js @@ -93,14 +93,14 @@ const PlayerColor = ({ color }) => { ); }; -class Placard extends React.Component { - render() { - return ( -
-
- ); - } +const Placard = ({type}) => { + return ( +
+ ); }; class Development extends React.Component { @@ -947,19 +947,29 @@ class Table extends React.Component { render() { const game = this.state.game, player = game ? game.player : undefined - + let color; + switch (game ? game.color : undefined) { + case "O": color = "orange"; break; + case "R": color = "red"; break; + case "B": color = "blue"; break; + case "W": color = "white"; break; + } return (
- { player !== undefined &&
- - - - - -
} + { player !== undefined && +
+
+ + + + + +
+ +
}
{ game &&
@@ -1004,19 +1014,8 @@ class Table extends React.Component {
- - -
-
-
Stats
-
-
Points: 7
-
Cards: {this.state.total}
-
Roads remaining: 4
-
Longest road: 7
-
Cities remaining: 4
-
Settlements remaining: 5
-
+ +
}
diff --git a/server/routes/games.js b/server/routes/games.js index e93f20f..78e3532 100755 --- a/server/routes/games.js +++ b/server/routes/games.js @@ -1139,7 +1139,7 @@ const sendGame = async (req, res, game, error) => { /* If the current turn is a robber placement, and everyone has * discarded, set the limits for where the robber can be placed */ - if (game.turn.roll === 7) { + if (game.turn && game.turn.roll === 7) { let move = true; for (let color in game.players) { const discard = game.players[color].mustDiscard; @@ -1157,6 +1157,7 @@ const sendGame = async (req, res, game, error) => { game.turn.limits.pips.push(i); } } else { + game.turn.limits = {}; game.turn.actions = []; } }