]> git.cworth.org Git - empires-server/blobdiff - empires.js
Remove old placeholder code for sending "Hello World"
[empires-server] / empires.js
index b0fc79ea2fb664c52246549f6c720a81b2f93391..b744f0faa2e0cc68a8d90963055e1a64a8b7b3ab 100644 (file)
@@ -79,6 +79,12 @@ class Game {
   }
 
   reveal_next() {
+    /* Don't try to reveal anything if we aren't in the reveal state. */
+    if (this.state != GameState.REVEAL) {
+      clearInterval(this.reveal_interval);
+      return;
+    }
+
     if (this.reveal_index >= this.characters_to_reveal.length) {
       clearInterval(this.reveal_interval);
       this.broadcast_event("character-reveal", '{"character":""}');
@@ -244,10 +250,6 @@ function handle_events(request, response) {
   });
 }
 
-app.get('/', (request, response) => {
-  response.send('Hello World!');
-});
-
 app.post('/register', (request, response) => {
   game.add_player(request.body.name, request.body.character);
   response.send();