diff --git a/src/components/Card/Card.tsx b/src/components/Card/Card.tsx
index af60a5c..8e753b7 100644
--- a/src/components/Card/Card.tsx
+++ b/src/components/Card/Card.tsx
@@ -6,7 +6,7 @@ import { buyCardActions } from '../Player/ActionMethods';
import { hasMaxReserved, reserveCard } from '../Player/ActionMethods/reserveCardActions';
const { buyCard, tooExpensive } = buyCardActions;
-export default function Card({ data, state, setState, reserved = false }: CardProps) {
+export default function Card({ data, state, setState, reserved = false, collapsed = false }: CardProps) {
const currentPlayer = useCurrentPlayer(state);
if (!data || !currentPlayer) return
;
@@ -18,7 +18,7 @@ export default function Card({ data, state, setState, reserved = false }: CardPr
return (
-

+ { collapsed ?
:

}
{data.gemValue.toUpperCase()}
diff --git a/src/components/Card/CardRow.scss b/src/components/Card/CardRow.scss
index 4ac6cd7..66ba456 100644
--- a/src/components/Card/CardRow.scss
+++ b/src/components/Card/CardRow.scss
@@ -5,7 +5,7 @@
display: flex;
flex-flow: column nowrap;
margin: 1rem 0;
- width: 55vw;
+ width: 45vw;
&.collapsed {
width: 15vw;
@@ -22,12 +22,12 @@
.card-row-cards-visible {
display: flex;
- flex-flow: row nowrap;
+ flex-flow: row wrap;
+ justify-content: right;
width: 100%;
- justify-content: space-around;
.card {
- width: 25%;
+ width: 35%;
height: 40vh;
border: 2px solid black;
diff --git a/src/components/Card/CardRow.tsx b/src/components/Card/CardRow.tsx
index 04e19e2..b106143 100644
--- a/src/components/Card/CardRow.tsx
+++ b/src/components/Card/CardRow.tsx
@@ -37,7 +37,7 @@ export default function CardRow({tier, state, setState}: CardRowProps) {
Remaining: {state.gameboard.deck[typedTier].length}
{ cards && cards.map((cardData: CardData) => {
- return
+ return
})}
diff --git a/src/components/Gameboard/Gameboard.scss b/src/components/Gameboard/Gameboard.scss
index 119e535..dca05e3 100644
--- a/src/components/Gameboard/Gameboard.scss
+++ b/src/components/Gameboard/Gameboard.scss
@@ -1,31 +1,37 @@
.gameboard {
display: flex;
- flex-flow: row nowrap;
+ flex-flow: column nowrap;
align-items: flex-start;
justify-content: center;
background-color: rgb(57, 57, 65);
- width: 100%;
+ width: 90vw;
+ padding: 0 18px 12px;
- section {
+ #round-marker {
+ padding-left: 8px;
+ }
+
+ .gameboard-columns {
display: flex;
- flex-flow: column nowrap;
- align-items: center;
+ flex-flow: row nowrap;
justify-content: center;
- margin: 1rem;
- padding: 1rem;
- }
-
- .gameboard-left {
align-items: flex-start;
- }
+ width: 100%;
+
+ section {
+ display: flex;
+ flex-flow: column nowrap;
+ }
- .gameboard-right {
- max-width: 30vw;
- align-items: flex-end;
- }
+ .gameboard-left {
+ align-items: flex-start;
+ width: 50%;
+ }
- .round-marker {
- font-size: 1.5rem;
+ .gameboard-right {
+ justify-content: flex-end;
+ width: 50%;
+ }
}
}
\ No newline at end of file
diff --git a/src/components/Gameboard/Gameboard.tsx b/src/components/Gameboard/Gameboard.tsx
index 12284f6..5418c96 100644
--- a/src/components/Gameboard/Gameboard.tsx
+++ b/src/components/Gameboard/Gameboard.tsx
@@ -87,18 +87,18 @@ export default function Gameboard({ state, setState }: StateProps) {
} else {
setView(
-
- Round: {state.round}
-
-
-
-
-
-
+
Round: {state.round}
+
)
}
diff --git a/src/components/Player/AllPlayers.scss b/src/components/Player/AllPlayers.scss
index 12d7e8c..a0cd50a 100644
--- a/src/components/Player/AllPlayers.scss
+++ b/src/components/Player/AllPlayers.scss
@@ -4,21 +4,26 @@
.all-players {
display: flex;
+ flex-flow: column nowrap;
justify-content: space-around;
- max-width: 80vw;
- padding: 0 2rem;
+ align-items: center;
background-color: rgb(237, 213, 156);
color: black;
.player-ui {
- width: 30vw;
- p {
- margin: 1rem;
- }
.subheader {
font-weight: bold;
}
+ background-color:rgb(172, 149, 94);
+ margin: 1rem 0;
+ padding: 0 2rem;
+
+ .turn-and-action-based {
+ display: flex;
+ flex-flow: row nowrap;
+ }
+
.resources {
.player-chips-enum {
display: flex;
diff --git a/src/components/Player/AllPlayers.tsx b/src/components/Player/AllPlayers.tsx
index f5e6091..3568887 100644
--- a/src/components/Player/AllPlayers.tsx
+++ b/src/components/Player/AllPlayers.tsx
@@ -1,15 +1,29 @@
import { v4 } from "uuid";
import Player from "./Player";
import { PlayerData } from "../../util/types";
-import { StateProps } from "../../util/propTypes";
+import { ResourceProps } from "../../util/propTypes";
import "./AllPlayers.scss"
+import AvailableChips from "../Resources/AvailableChips";
+import SelectionView from "../Resources/SelectionView";
+import { useEffect, useState } from "react";
+import { useCurrentPlayer } from "../../hooks/useCurrentPlayer";
+
+export default function AllPlayers({ state, setState, liftSelection }: ResourceProps) {
+ const [playerView, setPlayerView] = useState();
-export default function AllPlayers({ state, setState }: StateProps) {
const playerPool = state.players?.map((player: PlayerData) => );
+ useEffect(() => {
+ const currentPlayer = useCurrentPlayer(state);
+ if (!currentPlayer) return;
+ setPlayerView();
+ }, [state]);
+
return (
- { playerPool }
+
+
+ { playerView }
)
}
\ No newline at end of file
diff --git a/src/components/Player/Player.tsx b/src/components/Player/Player.tsx
index 0472df6..a3ae200 100644
--- a/src/components/Player/Player.tsx
+++ b/src/components/Player/Player.tsx
@@ -52,14 +52,11 @@ export default function Player({ player, state, setState }: PlayerProps) {
}
return (
-
+
Name: {player.name} {player.starter && "(round starter)"}
+
Score: {dynamic && dynamic.points}
- {/* Dynamic data from state */}
- Score: {dynamic && dynamic.points}
-
- {/* Player actions */}