This commit is contained in:
Moritz Ruth 2023-04-19 01:02:46 +02:00
parent 360b36874c
commit e80536cf67
Signed by: moritzruth
GPG key ID: C9BBAB79405EE56D
5 changed files with 14 additions and 7 deletions

View file

@ -1,7 +0,0 @@
import EventEmitter from "eventemitter3"
interface Events {
}
export const eventBus = new EventEmitter()

14
src/server/game.ts Normal file
View file

@ -0,0 +1,14 @@
import EventEmitter from "eventemitter3"
import type { GameAction } from "../shared/gameActions"
export const gameActionsBus = new EventEmitter<Record<string, [GameAction]>>()
interface Events {
broadcastAction: [GameAction]
}
export class Game extends EventEmitter<Events> {
constructor(public id: string) {
super()
}
}

0
src/shared/game/state.ts Normal file
View file