=) Yeah. A Comparator would fit the bill here I think. -- PEZ |
=) Yeah. A Comparator would fit the bill here I think. -- PEZ I had though about a comparator. I just have never been a big fan. Ah well. It does not seem to make me much better but I need to pass it to the [ultimate abitor] to verify. -- jim |
Perhaps you're getting caught in a [local minima] due to not projecting your position when the next wave impacts far enough forward / backward. Are you using RobocodeGL to graph your surfing? --David Alves
I have used RCGL to check it and I think it is OK. I should give that a try I suppose. It is a PITA to do though. RCGL is not the fastest thing in the world :( -- jim
Found it. Anyone notice anything wrong with this code?
private Wave getClosetWave() { double nearestDist = 10000; Wave retVal = null; Iterator it = waves.iterator(); while (it.hasNext()) { Wave w = (Wave)it.next(); if (w.shotOrigin.distance(w.targetLoc) - w.dist < nearestDist) { retVal = w; } } return retVal; }
It's tough enough to fight WaveSuffering but fighting against yourself too makes it even tougher. -- jim
=) Yeah. A Comparator would fit the bill here I think. -- PEZ
I had though about a comparator. I just have never been a big fan. Ah well. It does not seem to make me much better but I need to pass it to the [ultimate abitor] to verify. -- jim