- Created Wednesday, January 7th 2015 @ 22:42:47
Hello, recently I updated my java bot with a version that was tasted on my pc and got not compile error. When I uploaded it to the server It got this compile error:
src/minds/Bot.java:32: error: cannot find symbol myRegions.sort(new RegionByArmiesComp()); ^ symbol: method sort(RegionByArmiesComp) location: variable myRegions of type LinkedList 1 error
In code I have these 2 lines :
myRegions = enemy.getOwnedNeighbors(_state.getMyPlayerName());
So myRegions exists. I think what happens is that the compiler deosn't recognize sort method for LinkedLists.
- Created Wednesday, January 7th 2015 @ 22:48:54
If I replace myRegions.sort(new RegionByArmiesComp()); with Collections.sort(myRegions, new RegionByArmiesComp()); it works just fine...
- Created Thursday, January 8th 2015 @ 06:54:06
It sounds like you're using Java 8, but this competition uses Java 7.