battlecode / battlecode-2018

:rocket:
45 stars 22 forks source link

Fix Java bindings using short instead of boolean for some methods #108

Open HalfVoxel opened 6 years ago

HalfVoxel commented 6 years ago

Now things like this work

if (gc.queueResearch(UnitType.Knight)) {
    System.out.println("Bools work!");
}

instead of having to do

if (gc.queueResearch(UnitType.Knight) == 1) {
    System.out.println("Bools work!");
}
kazimuth commented 6 years ago

Oh, dang, hm.

Unfortunately this is a breaking-change to the API, and given our update system I don't want to break people's code underneath them. Maybe it would be best to define some new methods called e.g. queueResearchBool? That will require some plumbing though.

HalfVoxel commented 6 years ago

Well... Considering how much people are complaining about it being that way in Discord. I don't think people will complain much when it is fixed.

Daspy11 commented 6 years ago

please just fix it. tag everyone in the discord. it's awful.