summaryrefslogtreecommitdiff
path: root/client/src/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/main.ts')
-rw-r--r--client/src/main.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/client/src/main.ts b/client/src/main.ts
index 7ac13a3..b5ea424 100644
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -1,7 +1,7 @@
import { Game } from "./net/game.js";
import { InitialState, onLogic } from "./logic/logic.js";
import { startGraphicsUpdater } from "./renderer.js";
-import { GameKeyMap, Frame, Key } from "./types.js";
+import { GameKeyMap, Frame, Key, Player } from "./types.js";
const join = document.getElementById("join")
const lobby = document.getElementById("lobby")
@@ -42,7 +42,7 @@ const onLoad = (startData: Frame) => {
return false
}
- let players = Object.values(startData.data.players).filter(p => { return p !== null && p.name !== undefined })
+ let players = Object.values(startData.data.players).filter((p: Player): boolean => p !== null && p.name !== undefined)
if (players.length >= 4) {
alert('Room is full')
return false
@@ -59,7 +59,6 @@ const onFrame = (data: Frame, frame: number) => {
}
-
const startGame = (code: string, name: string) => {
const game = new Game(3000)