class WebClient {

  constructor(game) {

    this.game = game;

    this.socket = io();

    this.allRobotInfo = {};

    this.commandMap = {

      'message': console.dir,

      /**
       * Used to display command results received from robots.
       * @param {object} result
       */
      'command result': (result)=>{
        console.dir('command result');
        console.dir(result);
        this.addMessage(result.data, false);
      },

      'map data': (mapData)=>{
        console.dir('map data');
        console.dir(mapData);
        this.game.mapRender.addShapeVoxels(mapData.data, mapData.robot);
      },

      'block data': (blockData)=>{
        console.dir('block data');
        console.dir(blockData);
        let pos = new WorldAndScenePoint(blockData.data.point, true);
        if (!(blockData.data.name == 'minecraft:air')) {
          this.game.mapRender.addVoxel(pos, this.game.mapRender.colorFromHardness(blockData.data.hardness));
        }
        else {this.game.mapRender.removeVoxel(pos);}
      },

      'robot position': (pos)=>{
        console.dir('robot position');
        console.dir(pos);
        this.game.mapRender.moveRobotVoxel(new WorldAndScenePoint(pos.data, true), pos.robot);
        this.game.webClient.allRobotInfo[pos.robot].removeAllExternalInventories();
        if (pos.robot == document.getElementById('robotSelect').value) {
          let robotData = this.game.webClient.allRobotInfo[pos.robot];
          if (robotData) {
            this.game.mapRender.selectedRobotMesh.position.copy(robotData.getPosition().scene());
            this.game.mapRender.requestRender();
          }
        }
      },

      'delete selection': ()=>{

        

      },

      'dig success': ()=>{

        

      },

      'inventory data': ()=>{

        

      },

      'slot data': ()=>{

        

      },

      'listen start': ()=>{

        

      },

      'listen end': ()=>{

        

      },

      'power level': ()=>{

        

      },

      'available components': ()=>{

        

      },


    };

  }

}
@@ -438,24 +438,132 @@
 ;%0A      %7D,%0A%0A
+      /**%0A       * Used to render map data received from robots.%0A       * @param %7Bobject%7D mapData%0A       */%0A
       'map d
@@ -573,32 +573,32 @@
 ': (mapData)=%3E%7B%0A
-
         console.
@@ -723,24 +723,136 @@
 ;%0A      %7D,%0A%0A
+      /**%0A       * Used to render block data received from robots.%0A       * @param %7Bobject%7D blockData%0A       */%0A
       'block
@@ -1246,24 +1246,119 @@
 %7D%0A      %7D,%0A%0A
+      /**%0A       * Used to render the robot's position.%0A       * @param %7Bobject%7D pos%0A       */%0A
       'robot
@@ -1964,32 +1964,62 @@
     %7D%0A      %7D,%0A%0A
+      /**%0A       * %0A       */%0A
       'delete se
@@ -2051,24 +2051,54 @@
 %0A%0A      %7D,%0A%0A
+      /**%0A       * %0A       */%0A
       'dig s
@@ -2129,24 +2129,54 @@
 %0A%0A      %7D,%0A%0A
+      /**%0A       * %0A       */%0A
       'inven
@@ -2210,24 +2210,54 @@
 %0A%0A      %7D,%0A%0A
+      /**%0A       * %0A       */%0A
       'slot 
@@ -2282,32 +2282,62 @@
     %0A%0A      %7D,%0A%0A
+      /**%0A       * %0A       */%0A
       'listen st
@@ -2365,24 +2365,54 @@
 %0A%0A      %7D,%0A%0A
+      /**%0A       * %0A       */%0A
       'liste
@@ -2442,24 +2442,54 @@
 %0A%0A      %7D,%0A%0A
+      /**%0A       * %0A       */%0A
       'power
@@ -2520,24 +2520,54 @@
 %0A%0A      %7D,%0A%0A
+      /**%0A       * %0A       */%0A
       'avail

|23|=4(70|2