1

I have created AdvancedRobot. After first round in Run() I have got exceptions from Ahead method.

 public override void Run()
 {
        //...
        var moveAmount = Math.Max(BattleFieldWidth, BattleFieldHeight);
        Ahead(moveAmount);
        //...
 }

The exceptions are:

System.InvalidCastException: „Unable to cast object of type 'net.sf.robocode.dotnet.peer.ExecCommands' to type 'net.sf.robocode.dotnet.peer.ExecResults'.”

and

java.lang.Throwable; StackTrace „($exception).StackTrace”: „System.InvalidCastException” {System.InvalidCastException} Source "jni4net.n-0.8.7.0"

As a result my robot has a label "Disabled" and doesn't move. Have you got any ideas?

I use Robocode for .NET.

Kamil
  • 49
  • 1
  • 5

0 Answers0