Client: always set the rack when moving a tile to the board
authorRaphaël Jakse <raphael.trivabble@jakse.fr>
Fri, 1 May 2020 16:58:56 +0000 (18:58 +0200)
committerRaphaël Jakse <raphael.trivabble@jakse.fr>
Fri, 1 May 2020 16:58:56 +0000 (18:58 +0200)
trivabble.js

index 59a5bdc9e29f2e876c66ecce7243a8d030e4eecb..3a75fc760ef23ed01d53b7f9d6eb8e29f4c9c9a8 100644 (file)
@@ -27,7 +27,7 @@
 (function () {
     "use strict";
 
-    const VERSION = 202004262313;
+    const VERSION = 202005011900;
 
     const Conf = window.TrivabbleConf || {};
 
                 moveRack.rack[moveCMD.indexTo] = "";
                 sendCmds([moveRack, moveCMD]);
             } else {
-                sendCmds([moveCMD]);
+                // setting the rack is not necessary in most cases, but the
+                // player could have moved some letters of the rack when moving
+                // a tile to the board so let's set the rack in any case
+                // FIXME this could be improved
+                sendCmds([moveCMD, moveRack]);
             }
         }