server for my chess game
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index e162943..0fd4578 100644
--- a/src/index.js
+++ b/src/index.js
@@ -177,7 +177,7 @@ function handle_joinrequest(data, ws) {
const us = game.clients.color_of(ws);
const them = flip_color(us);
// in a ideal world, clients dont disconnect and stop existing. we do not live in a ideal world. (sadly) (or they just left the game :/)
- if (game.exists(them) && !they_know_about_me)
+ if (game.alive(them) && !they_know_about_me)
game.get_ws(them).send_packet(game.get_info(us), HEADERS.info);
// send a packet to us