]> git.cworth.org Git - empires-server/blobdiff - empires.js
Return the actual game object from create_game, not just the ID
[empires-server] / empires.js
index 78e7f2591d6b18cd14927b466d0f7b55399a1d94..cb7571d67ef3ff81934593cf76c8b5c407c65ce6 100644 (file)
@@ -1,8 +1,6 @@
 const express = require("express");
 const Game = require("./game.js");
 
-const engine_name = "empires";
-
 const router = express.Router();
 
 const GameState = {
@@ -34,8 +32,8 @@ function shuffle(a) {
 }
 
 class Empires extends Game {
-  constructor() {
-    super(engine_name);
+  constructor(id) {
+    super(id);
     this._spectators = [];
     this.next_spectator_id = 1;
     this._players = [];