Skip to content

Commit

Permalink
refacotr(webapp): rearrange game state and moves
Browse files Browse the repository at this point in the history
  • Loading branch information
ben196888 committed Jun 29, 2024
1 parent c1d0c72 commit 171883d
Show file tree
Hide file tree
Showing 33 changed files with 774 additions and 1,009 deletions.
5 changes: 2 additions & 3 deletions packages/webapp/src/components/BoardGame.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Client, BoardProps } from 'boardgame.io/react';
import { SocketIO, Local } from 'boardgame.io/multiplayer'
import { OpenStarTerVillage } from '@/game';
import game, { GameState } from '@/game';
import Table from '@/components/Table/Table';
import Players from '@/components/Players/Players';
import DevActions from '@/components/DevActions/DevActions';
import ActionBoard from './ActionBoard/ActionBoard';
import { GameState } from '@/game/game';

const Board: React.FC<BoardProps<GameState>> = (props) => {
const { G, ctx, debug } = props;
Expand All @@ -23,7 +22,7 @@ const Boardgame: React.FC<{ isLocal: boolean} & React.ComponentProps<ReturnType<
const multiplayer = isLocal ? Local() : SocketIO({ server: 'localhost:8000' });

const BoardgameComponent = Client({
game: OpenStarTerVillage,
game,
board: Board,
multiplayer,
})
Expand Down
2 changes: 1 addition & 1 deletion packages/webapp/src/components/Project/ActiveProject.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Project } from '@/game/table/table';
import { Project } from '@/game/store/slice/table';
import {
Box,
Table,
Expand Down
2 changes: 1 addition & 1 deletion packages/webapp/src/components/Table/Table.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Grid } from '@mui/material';
import ActiveProject from '../Project/ActiveProject';
import { Table as TableState } from '@/game/table/table';
import { Table as TableState } from '@/game/store/slice/table';

interface Props {
table: TableState;
Expand Down
36 changes: 0 additions & 36 deletions packages/webapp/src/game/cards/cards.test.ts

This file was deleted.

40 changes: 0 additions & 40 deletions packages/webapp/src/game/cards/cards.ts

This file was deleted.

102 changes: 0 additions & 102 deletions packages/webapp/src/game/decks/deck.test.ts

This file was deleted.

40 changes: 0 additions & 40 deletions packages/webapp/src/game/decks/deck.ts

This file was deleted.

18 changes: 0 additions & 18 deletions packages/webapp/src/game/decks/decks.ts

This file was deleted.

Loading

0 comments on commit 171883d

Please sign in to comment.