vo
background: color,
margin: "5px",
padding: "5px",
- borderRadius: "100px",
+ borderRadius: "10vw",
display: 'flex',
alignItems: 'center',
alignContent: 'center',
@@ -45,17 +61,17 @@ const HoleView: FunctionComponent<{ hole: Hole, color: string, onClick: () => vo
const StoreView: FunctionComponent<
{ store: Store, color: string, gridColumn: string, gridRow: string }> = ({ store, color, gridColumn, gridRow }) => {
- const balls = [...range(store.ballCount)].map((i) =>
)
+ const balls = [...range(store.ballCount)].map((i) =>
)
return (
{balls}
@@ -66,13 +82,13 @@ const BoardView: FunctionComponent<{ game?: Game, userKey: string, onHoleSelect:
game, userKey, onHoleSelect }) => {
const player1Holes = game?.board.player1Holes.map((hole) => (
-
{
+ {
if (game.turn == "player1") onHoleSelect(game.board.player1Holes.indexOf(hole), hole)
}} />
))
const player2Holes = game!!.board.player2Holes.map((hole) => (
- {
+ {
if (game.turn == "player2") onHoleSelect(game.board.player2Holes.indexOf(hole), hole)
}} />
))
@@ -82,23 +98,23 @@ const BoardView: FunctionComponent<{ game?: Game, userKey: string, onHoleSelect:
margin: '10px',
padding: '10px',
display: 'grid',
- gridTemplateColumns: 'repeat(8, 150px)',
- gridTemplateRows: '150px 150px',
- border: "2px solid black",
- borderRadius: "30px",
+ gridTemplateColumns: 'repeat(8, 11vw)',
+ gridTemplateRows: 'repeat(2, 11vw)',
+ borderRadius: "3vw",
+ background: theme.boardColor
}}>
{
game.getPlayerNameByKey(userKey) == "player2" ? (
<>
-
-
+
+
{player1Holes.reverse()}
{player2Holes}
>
) : (
<>
-
-
+
+
{player2Holes.reverse()}
{player1Holes}
>
diff --git a/src/index.html b/src/index.html
index 2618db2..cf30955 100644
--- a/src/index.html
+++ b/src/index.html
@@ -6,8 +6,23 @@
Mancala
-
-
+
+
+
+
+
\ No newline at end of file