aboutsummaryrefslogtreecommitdiffstats
path: root/backend/src/model/session.ts
diff options
context:
space:
mode:
Diffstat (limited to 'backend/src/model/session.ts')
-rw-r--r--backend/src/model/session.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/backend/src/model/session.ts b/backend/src/model/session.ts
new file mode 100644
index 0000000..d2fdea3
--- /dev/null
+++ b/backend/src/model/session.ts
@@ -0,0 +1,16 @@
+import { CoopWebSocket } from "./websocket";
+
+export type CoopSession = {
+ id: string;
+ state: SessionState;
+ host: CoopWebSocket;
+ clients: CoopWebSocket[];
+};
+
+export type VersusSession = {
+ id: string;
+ state: SessionState;
+ clients: string[];
+};
+
+export type SessionState = 'waiting' | 'playing' | 'finished'; \ No newline at end of file