本文整理汇总了C#中robocode类的典型用法代码示例。如果您正苦于以下问题:C# robocode类的具体用法?C# robocode怎么用?C# robocode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
robocode类属于命名空间,在下文中一共展示了robocode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BattleSpecification
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::[email protected]__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));
}
}
示例2: BattleSpecification
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));
}
}
示例3: MapRobotSnapshots
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;
}
示例4: RobotSpecification
internal RobotSpecification(robocode.control.RobotSpecification robotSpecification)
{
this.robotSpecification = robotSpecification;
}
示例5: onTurnStarted
public void onTurnStarted(robocode.control.events.TurnStartedEvent evnt)
{
engine.OnTurnStarted(new TurnStartedEvent());
}
示例6: MapRobotState
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;
}
}
示例7: TurnSnapshot
public TurnSnapshot(robocode.control.snapshot.ITurnSnapshot turnSnapshot)
{
this.turnSnapshot = turnSnapshot;
}
示例8: MapBulletSnapshots
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;
}
示例9: MapDebugProperties
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;
}
示例10: MapEvent
private static BattleCompletedEvent MapEvent(robocode.control.events.BattleCompletedEvent evnt)
{
return new BattleCompletedEvent(MapBattleRules(evnt.getBattleRules()), MapBattleResults(evnt.getIndexedResults()));
}
示例11: onBattleError
public void onBattleError(robocode.control.events.BattleErrorEvent evnt)
{
engine.OnBattleError(MapEvent(evnt));
}
示例12: onBattleMessage
public void onBattleMessage(robocode.control.events.BattleMessageEvent evnt)
{
engine.OnBattleMessage(MapEvent(evnt));
}
示例13: onTurnEnded
public void onTurnEnded(robocode.control.events.TurnEndedEvent evnt)
{
engine.OnTurnEnded(MapEvent(evnt));
}
示例14: MapRobotSnapshot
private static IRobotSnapshot MapRobotSnapshot(robocode.control.snapshot.IRobotSnapshot robotSnapshot)
{
return new RobotSnapshot(robotSnapshot);
}
示例15: MapScoreSnapshot
private static IScoreSnapshot MapScoreSnapshot(robocode.control.snapshot.IScoreSnapshot scoreSnapshot)
{
return new ScoreSnapshot(scoreSnapshot);
}