Possible mismatch between API documentation and implementation
ivarni opened this issue · 2 comments
First of all, thanks for making this. I had a lot of fun with it and I suspect I will have more fun with it when working towards a top score in epic mode.
I see references in the API docs for the space API to .getUnit
, .getLocation
and .isUnit
but they don't seem to actually be part of the API. When I console.log
the returned values from warrior.look()
and warrior.feel()
I also see functions that are not in the documentation, isWarrior
, isPlayer
, isEnemy
, isCaptive
and isTicking
. The unit API has .isBound
and isEnemy
which confuses me further since I've been using the .isCaptive
function all along.
Have I landed in a situation where my installed version is out of sync with the docs? If I'm not out of sync I'd be happy to make a PR to bring everything back in sync (though I'm not sure what .isTicking
does or what the difference between .isWarrior
and .isPlayer
is). If I am indeed out of sync with my installed version and the docs then I apologize in advance for making you read all of this :)
Hey @ivarni, you’re indeed out of sync. Run npm i -g @warriorjs/cli
to get the latest version. And thanks for your kind words, I’m glad you’re having fun. If you have any suggestion please open another issue, it’s always a pleasure to have people contributing!
@olistic I had installed the warriorjs package, which I see is two years old now that I look at it so that explains a lot 👀