Lux-AI-Challenge / Lux-Design-S1

Home to the design and engine of the @Lux-AI-Challenge Season 1, hosted on @kaggle
https://lux-ai.org/
Apache License 2.0
897 stars 152 forks source link

js transfer() method #72

Closed rooklift closed 3 years ago

rooklift commented 3 years ago

The call signature of the js transfer method here doesn't match the docs.

Also, I suppose it could be simplified down to something like this:

  transfer(destUnit, resourceType, amount) {
    let destID = typeof destUnit === "string" ? destUnit : destUnit.id;
    return `t ${this.id} ${destID} ${resourceType} ${amount}`;
  }

I've not actually tested this.

StoneT2000 commented 3 years ago

Oh good catch, thanks! well test it later

LittleAlvinMaker commented 3 years ago

PR #78 (basic tests passed)

StoneT2000 commented 3 years ago

close #78