Skip to content

Commit

Permalink
v.2
Browse files Browse the repository at this point in the history
  • Loading branch information
aghull committed Mar 20, 2024
1 parent dd9ed1f commit 5e4bc76
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/.save-states
/package-lock.json
/yarn.lock
tsconfig.tsbuildinfo
1 change: 1 addition & 0 deletions gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules
/.save-states
/build
tsconfig.tsbuildinfo
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"type": "module",
"dependencies": {
"@boardzilla/core": "^0.1.0",
"@boardzilla/core": "^0.2.0",
"react": "^18.2",
"react-dom": "^18.2"
},
Expand Down
3 changes: 1 addition & 2 deletions src/game/game-interface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import setup from './index.js';
import { createInterface } from '@boardzilla/core';

const { initialState, processMove, seatPlayer } = createInterface(setup)
export { initialState, processMove, seatPlayer };
export default createInterface(setup);
13 changes: 5 additions & 8 deletions src/game/index.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
import {
createGame,
createGameClasses,
Player,
Space,
Piece,
Game,
} from '@boardzilla/core';

export class MyGamePlayer extends Player<MyGamePlayer, MyGame> {
};

class MyGame extends Game<MyGamePlayer, MyGame> {
export class MyGamePlayer extends Player<MyGame, MyGamePlayer> {
}

const { Space, Piece } = createGameClasses<MyGamePlayer, MyGame>();
class MyGame extends Game<MyGame, MyGamePlayer> {
}

export default createGame(MyGamePlayer, MyGame, game => {

const { action } = game;
const { playerActions, loop, eachPlayer } = game.flowCommands;

game.registerClasses();

game.defineActions({
});

Expand Down

0 comments on commit 5e4bc76

Please sign in to comment.