public BattleSpecification(int par0, global::robocode.control.BattlefieldSpecification par1, robocode.control.RobotSpecification[] par2) : 
         base(((global::net.sf.jni4net.jni.JNIEnv)(null))) {
     global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.ThreadEnv;
     using(new global::net.sf.jni4net.jni.LocalFrame(@__env, 16)){
     @__env.NewObject(global::robocode.control.BattleSpecification.staticClass, global::robocode.control.BattleSpecification.@__ctorBattleSpecification8, this, global::net.sf.jni4net.utils.Convertor.ParPrimC2J(par0), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par1), global::net.sf.jni4net.utils.Convertor.ParArrayStrongCp2J(@__env, par2));
     }
 }
 public BattleSpecification(global::robocode.control.BattlefieldSpecification par0, int par1, long par2, double par3, int par4, bool par5, robocode.control.RobotSpecification[] par6, robocode.control.RobotSetup[] par7) : 
         base(((global::net.sf.jni4net.jni.JNIEnv)(null))) {
     global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.ThreadEnv;
     using(new global::net.sf.jni4net.jni.LocalFrame(@__env, 26)){
     @__env.NewObject(global::robocode.control.BattleSpecification.staticClass, global::robocode.control.BattleSpecification.j4n__ctorBattleSpecification11, this, global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par0), global::net.sf.jni4net.utils.Convertor.ParPrimC2J(par1), global::net.sf.jni4net.utils.Convertor.ParPrimC2J(par2), global::net.sf.jni4net.utils.Convertor.ParPrimC2J(par3), global::net.sf.jni4net.utils.Convertor.ParPrimC2J(par4), global::net.sf.jni4net.utils.Convertor.ParPrimC2J(par5), global::net.sf.jni4net.utils.Convertor.ParArrayStrongCp2J(@__env, par6), global::net.sf.jni4net.utils.Convertor.ParArrayStrongCp2J(@__env, par7));
     }
 }
Ejemplo n.º 3
0
        private static IRobotSnapshot[] MapRobotSnapshots(robocode.control.snapshot.IRobotSnapshot[] robotSnapshots)
        {
            if (robotSnapshots == null)
            {
                return null;
            }

            IRobotSnapshot[] mappedSnapshots = new IRobotSnapshot[robotSnapshots.Length];

            for (int i = 0; i < robotSnapshots.Length; i++)
            {
                mappedSnapshots[i] = MapRobotSnapshot(robotSnapshots[i]);
            }
            return mappedSnapshots;
        }
Ejemplo n.º 4
0
 internal RobotSpecification(robocode.control.RobotSpecification robotSpecification)
 {
     this.robotSpecification = robotSpecification;
 }
Ejemplo n.º 5
0
 public void onTurnStarted(robocode.control.events.TurnStartedEvent evnt)
 {
     engine.OnTurnStarted(new TurnStartedEvent());
 }
Ejemplo n.º 6
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;
     }
 }
Ejemplo n.º 7
0
 public TurnSnapshot(robocode.control.snapshot.ITurnSnapshot turnSnapshot)
 {
     this.turnSnapshot = turnSnapshot;
 }
Ejemplo n.º 8
0
        private static IBulletSnapshot[] MapBulletSnapshots(robocode.control.snapshot.IBulletSnapshot[] bulletSnapshots)
        {
            if (bulletSnapshots == null)
            {
                return null;
            }

            IBulletSnapshot[] mappedSnapshots = new IBulletSnapshot[bulletSnapshots.Length];

            for (int i = 0; i < bulletSnapshots.Length; i++)
            {
                mappedSnapshots[i] = MapBulletSnapshot(bulletSnapshots[i]);
            }
            return mappedSnapshots;
        }
Ejemplo n.º 9
0
        private static IDebugProperty[] MapDebugProperties(robocode.control.snapshot.IDebugProperty[] debugProperties)
        {
            if (debugProperties == null)
            {
                return null;
            }

            IDebugProperty[] mappedProperties = new IDebugProperty[debugProperties.Length];

            for (int i = 0; i < debugProperties.Length; i++)
            {
                mappedProperties[i] = MapDebugProperty(debugProperties[i]);
            }
            return mappedProperties;
        }
Ejemplo n.º 10
0
 private static BattleCompletedEvent MapEvent(robocode.control.events.BattleCompletedEvent evnt)
 {
     return new BattleCompletedEvent(MapBattleRules(evnt.getBattleRules()), MapBattleResults(evnt.getIndexedResults()));
 }
Ejemplo n.º 11
0
 private static BattleMessageEvent MapEvent(robocode.control.events.BattleMessageEvent evnt)
 {
     return new BattleMessageEvent(evnt.getMessage());
 }
Ejemplo n.º 12
0
 private static BattleStartedEvent MapEvent(robocode.control.events.BattleStartedEvent evnt)
 {
     return new BattleStartedEvent(MapBattleRules(evnt.getBattleRules()), evnt.getRobotsCount(), evnt.isReplay());
 }
Ejemplo n.º 13
0
 private static BattleFinishedEvent MapEvent(robocode.control.events.BattleFinishedEvent evnt)
 {
     return new BattleFinishedEvent(evnt.isAborted());
 }
Ejemplo n.º 14
0
 public void onBattleError(robocode.control.events.BattleErrorEvent evnt)
 {
     engine.OnBattleError(MapEvent(evnt));
 }
Ejemplo n.º 15
0
 public void onBattleMessage(robocode.control.events.BattleMessageEvent evnt)
 {
     engine.OnBattleMessage(MapEvent(evnt));
 }
Ejemplo n.º 16
0
 public void onTurnEnded(robocode.control.events.TurnEndedEvent evnt)
 {
     engine.OnTurnEnded(MapEvent(evnt));
 }
Ejemplo n.º 17
0
 private static IRobotSnapshot MapRobotSnapshot(robocode.control.snapshot.IRobotSnapshot robotSnapshot)
 {
     return new RobotSnapshot(robotSnapshot);
 }
Ejemplo n.º 18
0
 private static BattleErrorEvent MapEvent(robocode.control.events.BattleErrorEvent evnt)
 {
     return new BattleErrorEvent(evnt.getError());
 }
Ejemplo n.º 19
0
 private static IScoreSnapshot MapScoreSnapshot(robocode.control.snapshot.IScoreSnapshot scoreSnapshot)
 {
     return new ScoreSnapshot(scoreSnapshot);
 }
Ejemplo n.º 20
0
 private static RoundStartedEvent MapEvent(robocode.control.events.RoundStartedEvent evnt)
 {
     return new RoundStartedEvent(MapTurnSnapshot(evnt.getStartSnapshot()), evnt.getRound());
 }
Ejemplo n.º 21
0
 private static IBulletSnapshot MapBulletSnapshot(robocode.control.snapshot.IBulletSnapshot bulletSnapshot)
 {
     return new BulletSnapshot(bulletSnapshot);
 }
Ejemplo n.º 22
0
 private static Robocode.Control.Events.RoundEndedEvent MapEvent(robocode.control.events.RoundEndedEvent evnt)
 {
     return new Robocode.Control.Events.RoundEndedEvent(evnt.getRound(), evnt.getTurns(), evnt.getTotalTurns());
 }
Ejemplo n.º 23
0
 private static IDebugProperty MapDebugProperty(robocode.control.snapshot.IDebugProperty debugProperty)
 {
     return new DebugProperty(debugProperty.getKey(), debugProperty.getValue());
 }
Ejemplo n.º 24
0
 private static TurnEndedEvent MapEvent(robocode.control.events.TurnEndedEvent evnt)
 {
     return new TurnEndedEvent(MapTurnSnapshot(evnt.getTurnSnapshot()));
 }
Ejemplo n.º 25
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;
     }
 }
Ejemplo n.º 26
0
 public void onBattleResumed(robocode.control.events.BattleResumedEvent evnt)
 {
     engine.OnBattleResumed(new BattleResumedEvent());
 }
Ejemplo n.º 27
0
 public RobotSnapshot(robocode.control.snapshot.IRobotSnapshot robotSnapshot)
 {
     this.robotSnapshot = robotSnapshot;
 }
Ejemplo n.º 28
0
 private static ITurnSnapshot MapTurnSnapshot(robocode.control.snapshot.ITurnSnapshot turnSnapshot)
 {
     return new TurnSnapshot(turnSnapshot);
 }
Ejemplo n.º 29
0
        private static BattleCompletedEvent[] MapEvents(robocode.control.events.BattleCompletedEvent[] events)
        {
            if (events == null)
            {
                return null;
            }

            BattleCompletedEvent[] mappedEvents = new BattleCompletedEvent[events.Length];

            for (int i = 0; i < events.Length; i++)
            {
                mappedEvents[i] = MapEvent(events[i]);
            }
            return mappedEvents;
        }
Ejemplo n.º 30
0
 public void onRoundEnded(robocode.control.events.RoundEndedEvent evnt)
 {
     engine.OnRoundEnded(MapEvent(evnt));
 }