I am trying to write anything to Console, but with no luck.
System.out.println("abc");
Should work, but it is not. It is my whole code:
import robocode.HitWallEvent;
import robocode.Robot;
public class MyRobot extends Robot
{
@Override
public void run()
{
while (true)
{
ahead(20);
System.out.println("Test Test");
}
}
@Override
public void onHitWall(HitWallEvent event)
{
System.out.println("Ouch, I hit a wall bearing " + event.getBearing() + " degrees.");
}
}
What am i doing wrong?
Best regards!
Each bot prints to its own console. To access a bot's console:
Now you should see something like this that contains whatever messages your bot is printing to standard out.
This window is also what you would use, should you wish to view what your bot has painted on the battlefield. This is a particularly helpful feature for debugging.