+
-
-
-
+
+
diff --git a/client/svelte-client/src/NetworkSessionWrapper.svelte b/client/svelte-client/src/NetworkSessionWrapper.svelte
new file mode 100644
index 0000000..632d4e2
--- /dev/null
+++ b/client/svelte-client/src/NetworkSessionWrapper.svelte
@@ -0,0 +1,24 @@
+
+
+{#if !$session.session}
+ error!
+{:else if $session.session.state === SessionState.PENDING}
+ waiting for other player...
+{:else if $session.session.state === SessionState.CLOSED}
+ game over!
+{:else if $session.session.state === SessionState.RUNNING}
+
+{:else }
+ unknown game state
+{/if}
+
+
diff --git a/client/svelte-client/src/game/session.ts b/client/svelte-client/src/game/session.ts
index 8fb8cac..a099884 100644
--- a/client/svelte-client/src/game/session.ts
+++ b/client/svelte-client/src/game/session.ts
@@ -64,7 +64,7 @@ async function createSession(): Promise
{
});
return {
session_id: "a",
- state: SessionState.CLOSED,
+ state: SessionState.PENDING,
players: [],
observers: []
}
@@ -78,7 +78,7 @@ async function joinSession(sessionId): Promise {
});
return {
session_id: sessionId,
- state: SessionState.CLOSED,
+ state: SessionState.PENDING,
players: [],
observers: []
}
@@ -92,7 +92,7 @@ async function watchSession(sessionId): Promise {
});
return {
session_id: sessionId,
- state: SessionState.CLOSED,
+ state: SessionState.RUNNING,
players: [],
observers: []
}