Beispiel #1
0
 private static RobotState MapRobotState(robocode.control.snapshot.RobotState robotState)
 {
     switch (robotState.getValue())
     {
         case 0:
             return RobotState.Active;
         case 1:
             return RobotState.HitWall;
         case 2:
             return RobotState.HitRobot;
         case 3:
         default:
             return RobotState.Dead;
     }
 }
Beispiel #2
0
 private static BulletState MapBulletState(robocode.control.snapshot.BulletState bulletState)
 {
     switch (bulletState.getValue())
     {
         case 0:
             return BulletState.Fired;
         case 1:
             return BulletState.Moving;
         case 2:
             return BulletState.HitVictim;
         case 3:
             return BulletState.HitBullet;
         case 4:
             return BulletState.HitWall;
         case 5:
             return BulletState.Exploded;
         case 6:
         default:
             return BulletState.Inactive;
     }
 }
Beispiel #3
0
 private static IDebugProperty MapDebugProperty(robocode.control.snapshot.IDebugProperty debugProperty)
 {
     return new DebugProperty(debugProperty.getKey(), debugProperty.getValue());
 }