move() {
      this.stamina--;
      hm.nodes[this.currentNode].hunter--;

      this.currentNode = hm.nodes[this.currentNode].routes.sort((x, y) => {
          if (hm.nodes[x].boar !== hm.nodes[y].boar) {
              return hm.nodes[y].boar - hm.nodes[x].boar;
          }
          return hm.nodes[x].start - hm.nodes[y].start;
      })[0];

      this.moveNode.push(this.currentNode);
      hm.nodes[this.currentNode].hunter++;
  }
/**
* move function for travel between nodes 
*/
move function for travel between nodes
move function for travel between nodes
move() {
      this.stamina--;
      hm.nodes[this.currentNode].hunter--;
      this.currentNode = hm.nodes[this.currentNode].routes.sort((x, y) => {
          if (hm.nodes[x].boar !== hm.nodes[y].boar) {
              return hm.nodes[y].boar - hm.nodes[x].boar;
          }
          return hm.nodes[x].start - hm.nodes[y].start;
      })[0];
      this.moveNode.push(this.currentNode);
      hm.nodes[this.currentNode].hunter++;
  }
move ( ) { this . stamina -- ; hm . nodes [ this . currentNode ] . hunter -- ; this . currentNode = hm . nodes [ this . currentNode ] . routes . sort ( ( x , y ) => { if ( hm . nodes [ x ] . boar !== hm . nodes [ y ] . boar ) { return hm . nodes [ y ] . boar - hm . nodes [ x ] . boar ; } return hm . nodes [ x ] . start - hm . nodes [ y ] . start ; } ) [ 0 ] ; this . moveNode . push ( this . currentNode ) ; hm . nodes [ this . currentNode ] . hunter ++ ; }
move function for travel between nodes
move function for travel between nodes