This is the one bot that I think to be the grandfather of so many of todays bots. I know allt of my bots can trace their lineage directly to it. Jekyl started with this code base and grew from there. The tutorial and code can be found at http://www.ecs.soton.ac.uk/~awo101/robocode.html. Who else derives their code ultimately from here. I know Paul says his bots do too. Anyone else? -- jim |
This is the one bot that I think to be the grandfather of so many of todays bots. I know allt of my bots can trace their lineage directly to it. Jekyl started with this code base and grew from there. The tutorial and code can be found at |
This is because the object reference b has been set to the same object as a, in this case, the String object "hello". When comparing object refences using ==, it tests to see if the references point to the same objects on the heap memory. And actually, you shouldn't assume that it will work. If the code in Robocode is changed in the future in a way that the name setting is implemented the same way, or the Java compiler/JVM changes, you're robo is busted ;) -- Aziz |
This is because the object reference b has been set to the same object as a, in this case, the String object "hello". When comparing object refences using ==, it tests to see if the references point to the same objects on the heap memory. And actually, you shouldn't assume that it will work. If the code in Robocode is changed in the future in a way that the name setting is implemented the same way, or the Java compiler/JVM changes, you're robo is busted ;) -- Aziz |