Halite-II
Halite-II copied to clipboard
Sample code for javascript bot doesn't run
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!