Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. HDMI
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    HDMI

    @HDMI

    1
    Posts
    617
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    HDMI Follow

    Posts made by HDMI

    • RE: What's the function to calculate creep cost?

      In case anyone is looking for an answer, here's one way to do it:

      function bodyCost(body)
      {
          let sum = 0;
          for (let i in body)
              sum += BODYPART_COST[body[i]];
          return sum;
      }
      

      Then use it like so

      console.log(bodyCost([WORK, CARRY, MOVE]));
      
      posted in Help
      HDMI