Halite-II icon indicating copy to clipboard operation
Halite-II copied to clipboard

Sample code for javascript bot doesn't run

Open sebastianandreasson opened this issue 7 years ago • 0 comments

Just found this awesome project and tried out the starting javascript bot, however it didn't run for me. Looks to be usage of spread operator here

Changing it from

this._params = {
  health: constants.BASE_SHIP_HEALTH,
  dockingStatus: dockingStatus.UNDOCKED,
  ...params
}

to

this._params = Object.assign({
  health: constants.BASE_SHIP_HEALTH,
  dockingStatus: dockingStatus.UNDOCKED,
}, params)

and it runs fine!

sebastianandreasson avatar Jan 18 '18 22:01 sebastianandreasson