[Home]History of SnippetBot

Robo Home | Changes | Preferences | AllPages


Revision 21 . . May 22, 2008 9:45 EST by adsl-69-110-145-236.dsl.pltn13.pacbell.net
Revision 20 . . August 30, 2007 17:32 EST by Aziz [Clarification for == and String.equals()]
  

Difference (from prior major revision) (no other diffs)

Changed: 1c1
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 http://www.ecs.soton.ac.uk/~awo101/robocode.html Mirror: http://lhs.fuhsd.org/staff/peck_george/notemplate/robocode/SnippetBot/robocode.html. Who else derives their code ultimately from here. I know Paul says his bots do too. Anyone else? -- jim

Changed: 50c50
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

Robo Home | Changes | Preferences | AllPages
Search: