]> git.r.bdr.sh - rbdr/sorting-hat/blobdiff - lib/sorting_hat.js
Merge branch 'feature/rbdr-initial-dev' into develop
[rbdr/sorting-hat] / lib / sorting_hat.js
index e4d8d60d503afbd7caaa64f1bf712af979459ecf..ac78f3db43bdc23611e889f27bff37ae2734a687 100644 (file)
@@ -31,7 +31,7 @@ const internals = {
     tmnt: {
       leonardo: ['hiAlpha', 'loBeta', 'loGamma'],
       donatello: ['loAlpha', 'hiAlpha', 'midGamma'],
     tmnt: {
       leonardo: ['hiAlpha', 'loBeta', 'loGamma'],
       donatello: ['loAlpha', 'hiAlpha', 'midGamma'],
-      michaelangelo: ['delta', 'theta', 'loAlpha'],
+      michaelangelo: ['loAlpha', 'hiBeta', 'midGamma'],
       raphael: ['loBeta', 'hiBeta', 'loGamma']
     }
   }
       raphael: ['loBeta', 'hiBeta', 'loGamma']
     }
   }
@@ -96,7 +96,7 @@ module.exports = class SortingHat {
     this._mindWave = null; // Our main device
     this._socketServer = null; // Our socket server used to communicate with frontend
     this._timer = null; // An internal timer for time based states
     this._mindWave = null; // Our main device
     this._socketServer = null; // Our socket server used to communicate with frontend
     this._timer = null; // An internal timer for time based states
-    this._winner = null // The current winner
+    this._winner = null; // The current winner
   }
 
   /**
   }
 
   /**
@@ -353,7 +353,7 @@ module.exports = class SortingHat {
 
     for (const client of this._socketServer.clients) {
       if (client.readyState === WebSocket.OPEN) {
 
     for (const client of this._socketServer.clients) {
       if (client.readyState === WebSocket.OPEN) {
-        client.send(state);
+        client.send(JSON.stringify(state));
       }
     }
   }
       }
     }
   }