server for my chess game
Diffstat (limited to 'src/clients.js')
-rw-r--r--src/clients.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/clients.js b/src/clients.js
index f018a12..3e64702 100644
--- a/src/clients.js
+++ b/src/clients.js
@@ -61,8 +61,8 @@ export class Clients {
else this.b = create_data(ws, id, name, country);
}
- exists(color) {
- return color === "w" ? !this.w.empty : !this.b.empty;
+ alive(color) {
+ return color === "w" ? !!this.w.ws : !!this.b.ws;
}
// fake function overloading