Compare commits
15 Commits
master
...
liangshawn
Author | SHA1 | Date |
---|---|---|
ALEX11 | e3c8608f8a | |
ALEX11 | 19f4b31af9 | |
ALEX11 | daa5c52067 | |
ALEX11 | 4572bed23a | |
ALEX11 | 71f1486770 | |
ALEX11 | 93d851621a | |
ALEX11 | a41e1a90da | |
ALEX11 | 3f8a739940 | |
ALEX11 | 6cb9c7742c | |
ALEX11 | 5d5ddd74f8 | |
ALEX11 | 766372dd49 | |
ALEX11 | d4d3c55d50 | |
ALEX11 | 713ddd21e0 | |
ALEX11 | cafc732331 | |
ALEX11 | 15a43e3140 |
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,149 @@
|
|||
package com.pandafighter;
|
||||
import robocode.*;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.awt.Color;
|
||||
public class pandafighter extends AdvancedRobot
|
||||
{
|
||||
double moveDirection;
|
||||
enemyStat enemy = new enemyStat();
|
||||
public void run()
|
||||
{
|
||||
setBodyColor(Color.black);
|
||||
setGunColor(Color.WHITE);
|
||||
setRadarColor(Color.WHITE);
|
||||
setScanColor(Color.BLACK);
|
||||
setBulletColor(Color.YELLOW);
|
||||
setAdjustGunForRobotTurn(true);
|
||||
setAdjustRadarForGunTurn(true);
|
||||
setTurnRadarRightRadians(2*Math.PI); //让雷达一直转
|
||||
while(true)
|
||||
{
|
||||
doFire();
|
||||
doScannedRobot();
|
||||
doMovement() ;
|
||||
execute();
|
||||
}
|
||||
}
|
||||
public void onScannedRobot(ScannedRobotEvent e)
|
||||
{
|
||||
enemy.updateStat(e, this);
|
||||
}
|
||||
public void doMovement()//随机移动
|
||||
{ //程序首先判断运动是否完成,若完成,随机选出一个座标点,移动到该点
|
||||
if( Math.abs( getDistanceRemaining() ) < 1 )
|
||||
{
|
||||
double myX = getX();
|
||||
double myY = getY();
|
||||
double nextX, nextY; // the next point move to
|
||||
nextX = Math.random() * ( getBattleFieldWidth() - 100 ) + 50;
|
||||
nextY = Math.random() * ( getBattleFieldHeight() - 100 ) + 50;
|
||||
double turnAngle =getAngle(myX,myY,nextX,nextY );
|
||||
turnAngle = normalizeBearing( turnAngle - getHeadingRadians() );
|
||||
double moveDistance = Point2D.distance( myX, myY, nextX, nextY );
|
||||
double moveDirection = 1;
|
||||
if ( Math.abs( turnAngle ) >Math.PI/2)
|
||||
{
|
||||
turnAngle = normalizeBearing( turnAngle + Math.PI);
|
||||
moveDirection *= -1;
|
||||
}
|
||||
setTurnRightRadians( turnAngle );
|
||||
setAhead( moveDirection * moveDistance ); }
|
||||
}
|
||||
public static double getAngle(double x1, double y1, double x2, double y2)
|
||||
{
|
||||
return Math.atan2( x2 - x1, y2 - y1 );
|
||||
}
|
||||
public void doScannedRobot()
|
||||
{
|
||||
if (getTime()-enemy.time>1)
|
||||
{
|
||||
setTurnRadarRightRadians(3*Math.PI);
|
||||
}
|
||||
else
|
||||
{
|
||||
double absolation_bearing=(getHeadingRadians()+enemy.relative_bearing)%(2*Math.PI);
|
||||
double relative_radar_bearing=getRadarHeadingRadians()-absolation_bearing;
|
||||
double a=normalizeBearing(relative_radar_bearing);
|
||||
setTurnRadarLeftRadians(a);
|
||||
}
|
||||
}
|
||||
public double normalizeBearing( double angle )
|
||||
{
|
||||
if ( angle < -Math.PI )
|
||||
angle += 2*Math.PI;
|
||||
if ( angle > Math.PI )
|
||||
angle -= 2*Math.PI;
|
||||
return angle;
|
||||
}
|
||||
public void doFire()
|
||||
{
|
||||
double heading_offset=enemy.en_heading-enemy.pre_heading+0.000001;
|
||||
double distance=enemy.distance;
|
||||
double bullet_velocity=20-3*3;
|
||||
double r=enemy.velocity/heading_offset;
|
||||
double heading=0.0;
|
||||
for(int i=0;i<4;i++)//迭代 使预测更加准确
|
||||
{
|
||||
double b_travel_ti=distance/bullet_velocity;
|
||||
double predict_heading_r=enemy.en_heading+heading_offset*b_travel_ti;
|
||||
double predict_x=enemy.xCoordinate-r*Math.cos(predict_heading_r)+r*Math.cos(enemy.en_heading);
|
||||
double predict_y=enemy.yCoordinate+r*Math.sin(predict_heading_r)-r*Math.sin(enemy.en_heading);
|
||||
heading=Math.atan2(predict_x-getX(),predict_y-getY());
|
||||
double diatance=Point2D.distance( getX(), getY(), predict_x, predict_y );
|
||||
}
|
||||
double a=normalizeBearing(heading-getGunHeadingRadians());
|
||||
setTurnGunRightRadians(a);
|
||||
setFire(3);
|
||||
}
|
||||
public void onHitByBullet(HitByBulletEvent e)
|
||||
{
|
||||
if(getX()>150&&getY()>150&&enemy.battle_w-getX()>150&&enemy.battle_h-getY()>150)
|
||||
{
|
||||
double dist=150;
|
||||
double a=normalizeBearing(90 - (getHeading() - e.getHeading()));
|
||||
if(Math.abs(a)>Math.PI/2)
|
||||
{
|
||||
a=normalizeBearing(a+Math.PI);
|
||||
}
|
||||
setTurnRight( a);
|
||||
setAhead(dist);
|
||||
dist *= -1;
|
||||
}
|
||||
}
|
||||
public void onWin(WinEvent e)
|
||||
{
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
turnGunRightRadians(Math.PI*3/4);
|
||||
turnGunLeftRadians(Math.PI*3/4);
|
||||
}
|
||||
}
|
||||
}
|
||||
class enemyStat //方法
|
||||
|
||||
{ public double pre_heading;
|
||||
public double en_heading;
|
||||
double xCoordinate;
|
||||
double yCoordinate;
|
||||
double direction;
|
||||
double battle_h;
|
||||
double battle_w;
|
||||
double relative_bearing;
|
||||
double velocity;
|
||||
double time;
|
||||
double distance;
|
||||
public void updateStat(ScannedRobotEvent e,AdvancedRobot ar)
|
||||
{
|
||||
pre_heading=en_heading;
|
||||
en_heading=e.getHeadingRadians();
|
||||
battle_h=ar.getBattleFieldHeight();
|
||||
battle_w=ar.getBattleFieldWidth();
|
||||
relative_bearing=e.getBearingRadians();
|
||||
direction = relative_bearing + ar.getHeadingRadians();
|
||||
xCoordinate= ar.getX() + Math.sin( direction ) * distance;
|
||||
yCoordinate = ar.getY() + Math.cos( direction ) *distance;
|
||||
velocity=e.getVelocity();
|
||||
time=e.getTime();
|
||||
distance=e.getDistance();
|
||||
}
|
||||
}
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/resources" excluding="**/_svn/**|**/.svn/**|**/.git/**|**/*.java"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
<classpathentry excluding="**/_svn/**|**/.svn/**|**/.git/**|**/*.java" kind="src" path="src/main/resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="src" path="/robocode.dotnet.host"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.host/1.9.2.4/robocode.host-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.core/1.9.2.4/robocode.core-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.host/1.9.2.5/robocode.host-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.core/1.9.2.5/robocode.core-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/picocontainer/picocontainer/2.14.2/picocontainer-2.14.2.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.repository/1.9.2.4/robocode.repository-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.repository/1.9.2.5/robocode.repository-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/codesize/1.1/codesize-1.1.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/jni4net/jni4net.j/0.8.7.0/jni4net.j-0.8.7.0.jar"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
|
@ -1,14 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="src" path="/robocode.dotnet.installer"/>
|
||||
<classpathentry kind="src" path="/robocode.dotnet.content"/>
|
||||
<classpathentry kind="src" path="/robocode.dotnet.host"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.host/1.9.2.4/robocode.host-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.core/1.9.2.4/robocode.core-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.host/1.9.2.5/robocode.host-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.core/1.9.2.5/robocode.core-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/picocontainer/picocontainer/2.14.2/picocontainer-2.14.2.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.repository/1.9.2.4/robocode.repository-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.repository/1.9.2.5/robocode.repository-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/codesize/1.1/codesize-1.1.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/jni4net/jni4net.j/0.8.7.0/jni4net.j-0.8.7.0.jar"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
|
@ -1,16 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
|
||||
<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/java"/>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.host/1.9.2.4/robocode.host-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.api/1.9.2.4/robocode.api-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.core/1.9.2.4/robocode.core-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.host/1.9.2.5/robocode.host-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.api/1.9.2.5/robocode.api-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.core/1.9.2.5/robocode.core-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/picocontainer/picocontainer/2.14.2/picocontainer-2.14.2.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.repository/1.9.2.4/robocode.repository-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.repository/1.9.2.5/robocode.repository-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/codesize/1.1/codesize-1.1.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/jni4net/jni4net.j/0.8.7.0/jni4net.j-0.8.7.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/junit/junit/4.11/junit-4.11.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
|
@ -46,7 +46,7 @@ public class Module extends BaseModule {
|
|||
}
|
||||
|
||||
final String nhost = libsDir + "/robocode.dotnet.nhost-" + version + ".dll";
|
||||
final String ncontrol = libsDir + "/robocode.control.dll";
|
||||
final String ncontrol = libsDir + "/robocode.control.dll";bhq
|
||||
|
||||
Bridge.init(new File(libsDir));
|
||||
// Bridge.setVerbose(true);
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
|
||||
<classpathentry kind="src" path="src/test/resources" excluding="**/_svn/**|**/.svn/**|**/.git/**|**/*.java"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/java"/>
|
||||
<classpathentry excluding="**/_svn/**|**/.svn/**|**/.git/**|**/*.java" kind="src" path="src/test/resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.core/1.9.2.4/robocode.core-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.api/1.9.2.4/robocode.api-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.core/1.9.2.5/robocode.core-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.api/1.9.2.5/robocode.api-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/picocontainer/picocontainer/2.14.2/picocontainer-2.14.2.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.host/1.9.2.4/robocode.host-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.battle/1.9.2.4/robocode.battle-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.repository/1.9.2.4/robocode.repository-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.host/1.9.2.5/robocode.host-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.battle/1.9.2.5/robocode.battle-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.repository/1.9.2.5/robocode.repository-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/codesize/1.1/codesize-1.1.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.samples/1.9.2.4/robocode.samples-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.tests/1.9.2.4/robocode.tests-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.tests.robots/1.9.2.4/robocode.tests.robots-1.9.2.4.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.samples/1.9.2.5/robocode.samples-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.tests/1.9.2.5/robocode.tests-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.tests.robots/1.9.2.5/robocode.tests.robots-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/junit/junit/4.11/junit-4.11.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/>
|
||||
<classpathentry kind="src" path="/robocode.dotnet.host"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/jni4net/jni4net.j/0.8.7.0/jni4net.j-0.8.7.0.jar"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
|
@ -40,33 +40,33 @@ public class TestMaxTurnRate extends RobocodeTestBed {
|
|||
if (event.getTurnSnapshot().getTurn() == 26) {
|
||||
final String out = buf.toString();
|
||||
|
||||
Assert.assertTrue(out.contains("1: 0.0, 0.0") | out.contains("1: 0.0, -0.0"));
|
||||
Assert.assertTrue(out.contains("2: 0.0, -1.0") | out.contains("2: 0.0, -0.999999999"));
|
||||
Assert.assertTrue(out.contains("3: 0.0, -2.0") | out.contains("3: 0.0, -1.999999999"));
|
||||
Assert.assertTrue(out.contains("4: 0.0, -3.0") | out.contains("4: 0.0, -2.999999999"));
|
||||
Assert.assertTrue(out.contains("5: 0.0, -4.0") | out.contains("5: 0.0, -3.999999999"));
|
||||
Assert.assertTrue(out.contains("6: 0.0, -5.0") | out.contains("6: 0.0, -4.999999999"));
|
||||
Assert.assertTrue(out.contains("7: 0.0, -6.0") | out.contains("7: 0.0, -5.999999999"));
|
||||
Assert.assertTrue(out.contains("8: 0.0, -7.0") | out.contains("8: 0.0, -6.999999999"));
|
||||
Assert.assertTrue(out.contains("9: 0.0, -8.0") | out.contains("9: 0.0, -7.999999999"));
|
||||
Assert.assertTrue(out.contains("10: 0.0, -9.0") | out.contains("10: 0.0, -8.999999999"));
|
||||
Assert.assertTrue(out.contains("11: 0.0, -10.0") | out.contains("11: 0.0, -9.999999999"));
|
||||
Assert.assertTrue(out.contains("12: 0.0, -10.0") | out.contains("12: 0.0, -9.999999999"));
|
||||
Assert.assertTrue(out.contains("13: 0.0, -10.0") | out.contains("13: 0.0, -9.999999999"));
|
||||
Assert.assertTrue(out.contains("1: 0.0, 0.0") || out.contains("1: 0.0, -0.0"));
|
||||
Assert.assertTrue(out.contains("2: 0.0, -1.0") || out.contains("2: 0.0, -0.999999999"));
|
||||
Assert.assertTrue(out.contains("3: 0.0, -2.0") || out.contains("3: 0.0, -1.999999999"));
|
||||
Assert.assertTrue(out.contains("4: 0.0, -3.0") || out.contains("4: 0.0, -2.999999999"));
|
||||
Assert.assertTrue(out.contains("5: 0.0, -4.0") || out.contains("5: 0.0, -3.999999999"));
|
||||
Assert.assertTrue(out.contains("6: 0.0, -5.0") || out.contains("6: 0.0, -4.999999999"));
|
||||
Assert.assertTrue(out.contains("7: 0.0, -6.0") || out.contains("7: 0.0, -5.999999999"));
|
||||
Assert.assertTrue(out.contains("8: 0.0, -7.0") || out.contains("8: 0.0, -6.999999999"));
|
||||
Assert.assertTrue(out.contains("9: 0.0, -8.0") || out.contains("9: 0.0, -7.999999999"));
|
||||
Assert.assertTrue(out.contains("10: 0.0, -9.0") || out.contains("10: 0.0, -8.999999999"));
|
||||
Assert.assertTrue(out.contains("11: 0.0, -10.0") || out.contains("11: 0.0, -9.999999999"));
|
||||
Assert.assertTrue(out.contains("12: 0.0, -10.0") || out.contains("12: 0.0, -9.999999999"));
|
||||
Assert.assertTrue(out.contains("13: 0.0, -10.0") || out.contains("13: 0.0, -9.999999999"));
|
||||
|
||||
Assert.assertTrue(out.contains("14: 0.0, 0.0") | out.contains("14: 0.0, -0.0"));
|
||||
Assert.assertTrue(out.contains("15: 0.0, 1.0") | out.contains("15: 0.0, 0.999999999"));
|
||||
Assert.assertTrue(out.contains("16: 0.0, 2.0") | out.contains("16: 0.0, 1.999999999"));
|
||||
Assert.assertTrue(out.contains("17: 0.0, 3.0") | out.contains("17: 0.0, 2.999999999"));
|
||||
Assert.assertTrue(out.contains("18: 0.0, 4.0") | out.contains("18: 0.0, 3.999999999"));
|
||||
Assert.assertTrue(out.contains("19: 0.0, 5.0") | out.contains("19: 0.0, 4.999999999"));
|
||||
Assert.assertTrue(out.contains("20: 0.0, 6.0") | out.contains("20: 0.0, 5.999999999"));
|
||||
Assert.assertTrue(out.contains("21: 0.0, 7.0") | out.contains("21: 0.0, 6.999999999"));
|
||||
Assert.assertTrue(out.contains("22: 0.0, 8.0") | out.contains("22: 0.0, 7.999999999"));
|
||||
Assert.assertTrue(out.contains("23: 0.0, 9.0") | out.contains("23: 0.0, 8.999999999"));
|
||||
Assert.assertTrue(out.contains("24: 0.0, 10.0") | out.contains("24: 0.0, 9.999999999"));
|
||||
Assert.assertTrue(out.contains("25: 0.0, 10.0") | out.contains("25: 0.0, 9.999999999"));
|
||||
Assert.assertTrue(out.contains("26: 0.0, 10.0") | out.contains("26: 0.0, 9.999999999"));
|
||||
Assert.assertTrue(out.contains("14: 0.0, 0.0") || out.contains("14: 0.0, -0.0"));
|
||||
Assert.assertTrue(out.contains("15: 0.0, 1.0") || out.contains("15: 0.0, 0.999999999"));
|
||||
Assert.assertTrue(out.contains("16: 0.0, 2.0") || out.contains("16: 0.0, 1.999999999"));
|
||||
Assert.assertTrue(out.contains("17: 0.0, 3.0") || out.contains("17: 0.0, 2.999999999"));
|
||||
Assert.assertTrue(out.contains("18: 0.0, 4.0") || out.contains("18: 0.0, 3.999999999"));
|
||||
Assert.assertTrue(out.contains("19: 0.0, 5.0") || out.contains("19: 0.0, 4.999999999"));
|
||||
Assert.assertTrue(out.contains("20: 0.0, 6.0") || out.contains("20: 0.0, 5.999999999"));
|
||||
Assert.assertTrue(out.contains("21: 0.0, 7.0") || out.contains("21: 0.0, 6.999999999"));
|
||||
Assert.assertTrue(out.contains("22: 0.0, 8.0") || out.contains("22: 0.0, 7.999999999"));
|
||||
Assert.assertTrue(out.contains("23: 0.0, 9.0") || out.contains("23: 0.0, 8.999999999"));
|
||||
Assert.assertTrue(out.contains("24: 0.0, 10.0") || out.contains("24: 0.0, 9.999999999"));
|
||||
Assert.assertTrue(out.contains("25: 0.0, 10.0") || out.contains("25: 0.0, 9.999999999"));
|
||||
Assert.assertTrue(out.contains("26: 0.0, 10.0") || out.contains("26: 0.0, 9.999999999"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.api/1.9.0.0/robocode.api-1.9.0.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.api/1.9.2.5/robocode.api-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/junit/junit/4.11/junit-4.11.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="src" path="/robocode.testing.api"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.api/1.9.0.0/robocode.api-1.9.0.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.api/1.9.2.5/robocode.api-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/junit/junit/4.11/junit-4.11.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/>
|
||||
<classpathentry kind="src" path="/robocode.testing.content"/>
|
||||
<classpathentry kind="src" path="/robocode.testing.samples"/>
|
||||
<classpathentry kind="src" path="/robocode.testing.installer"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.api/1.9.0.0/robocode.api-1.9.0.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.api/1.9.2.5/robocode.api-1.9.2.5.jar"/>
|
||||
<classpathentry kind="src" path="/robocode.testing.api"/>
|
||||
<classpathentry kind="var" path="M2_REPO/junit/junit/4.11/junit-4.11.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.tests/1.9.0.0/robocode.tests-1.9.0.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.tests.robots/1.9.0.0/robocode.tests.robots-1.9.0.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.samples/1.9.0.0/robocode.samples-1.9.0.0.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.tests/1.9.2.5/robocode.tests-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.tests.robots/1.9.2.5/robocode.tests.robots-1.9.2.5.jar"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/robocode.samples/1.9.2.5/robocode.samples-1.9.2.5.jar"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
|
@ -2,13 +2,10 @@
|
|||
<projectDescription>
|
||||
<name>robocode.api</name>
|
||||
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<projects/>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.profile"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
|
|
|
@ -572,7 +572,18 @@ public class Robot extends _Robot implements IInteractiveRobot, IPaintRobot, IBa
|
|||
return 0; // never called
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the sentry border size for a {@link robocode.BorderSentry BorderSentry} that defines the how
|
||||
* far a BorderSentry is allowed to move from the border edges measured in units.<br>
|
||||
* Hence, the sentry border size defines the width/range of the border area surrounding the battlefield that
|
||||
* BorderSentrys cannot leave (sentry robots robots must stay in the border area), but it also define the
|
||||
* distance from the border edges where BorderSentrys are allowed/able to make damage to robots entering this
|
||||
* border area.
|
||||
*
|
||||
* @return the border size in units/pixels.
|
||||
*
|
||||
* @since 1.9.0.0
|
||||
*/
|
||||
public int getSentryBorderSize() {
|
||||
if (peer != null) {
|
||||
return peer.getSentryBorderSize();
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://robocode.sourceforge.net/license/epl-v10.html
|
||||
*/
|
||||
package robocode;
|
||||
|
||||
|
||||
|
@ -10,10 +17,43 @@ import java.io.Serializable;
|
|||
import java.util.Vector;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* An advanced type of robot that supports sending messages between team
|
||||
* mates in a robot team.
|
||||
* <p/>
|
||||
* If you have not done already, you should create a {@link Robot} or
|
||||
* {@link AdvancedRobot} first.
|
||||
*
|
||||
* @see JuniorRobot
|
||||
* @see Robot
|
||||
* @see AdvancedRobot
|
||||
* @see RateControlRobot
|
||||
* @see Droid
|
||||
* @see BorderSentry
|
||||
*
|
||||
* @author Mathew A. Nelson (original)
|
||||
* @author Flemming N. Larsen (contributor)
|
||||
* @author Pavel Savara (contributor)
|
||||
*/
|
||||
public class TeamRobot extends AdvancedRobot implements ITeamRobot, ITeamEvents {
|
||||
|
||||
|
||||
/**
|
||||
* Broadcasts a message to all teammates.
|
||||
* <p/>
|
||||
* Example:
|
||||
* <pre>
|
||||
* public void run() {
|
||||
* broadcastMessage("I'm here!");
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @param message the message to broadcast to all teammates
|
||||
* @throws IOException if the message could not be broadcasted to the
|
||||
* teammates
|
||||
* @see #isTeammate(String)
|
||||
* @see #getTeammates()
|
||||
* @see #sendMessage(String, Serializable)
|
||||
*/
|
||||
public void broadcastMessage(Serializable message) throws IOException {
|
||||
if (peer != null) {
|
||||
((ITeamRobotPeer) peer).broadcastMessage(message);
|
||||
|
@ -22,7 +62,23 @@ public class TeamRobot extends AdvancedRobot implements ITeamRobot, ITeamEvents
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a vector containing all MessageEvents currently in the robot's
|
||||
* queue. You might, for example, call this while processing another event.
|
||||
* <p/>
|
||||
* Example:
|
||||
* <pre>
|
||||
* for (MessageEvent e : getMessageEvents()) {
|
||||
* // do something with e
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @return a vector containing all MessageEvents currently in the robot's
|
||||
* queue
|
||||
* @see #onMessageReceived(MessageEvent)
|
||||
* @see MessageEvent
|
||||
* @since 1.2.6
|
||||
*/
|
||||
public Vector<MessageEvent> getMessageEvents() {
|
||||
if (peer != null) {
|
||||
return new Vector<MessageEvent>(((ITeamRobotPeer) peer).getMessageEvents());
|
||||
|
@ -40,7 +96,30 @@ public class TeamRobot extends AdvancedRobot implements ITeamRobot, ITeamEvents
|
|||
return this; // this robot is listening
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the names of all teammates, or {@code null} there is no
|
||||
* teammates.
|
||||
* <p/>
|
||||
* Example:
|
||||
* <pre>
|
||||
* public void run() {
|
||||
* // Prints out all teammates
|
||||
* String[] teammates = getTeammates();
|
||||
* if (teammates != null) {
|
||||
* for (String member : teammates) {
|
||||
* out.println(member);
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @return a String array containing the names of all your teammates, or
|
||||
* {@code null} if there is no teammates. The length of the String array
|
||||
* is equal to the number of teammates.
|
||||
* @see #isTeammate(String)
|
||||
* @see #broadcastMessage(Serializable)
|
||||
* @see #sendMessage(String, Serializable)
|
||||
*/
|
||||
public String[] getTeammates() {
|
||||
if (peer != null) {
|
||||
return ((ITeamRobotPeer) peer).getTeammates();
|
||||
|
@ -49,7 +128,26 @@ public class TeamRobot extends AdvancedRobot implements ITeamRobot, ITeamEvents
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if a given robot name is the name of one of your teammates.
|
||||
* <p/>
|
||||
* Example:
|
||||
* <pre>
|
||||
* public void onScannedRobot(ScannedRobotEvent e) {
|
||||
* if (isTeammate(e.getName()) {
|
||||
* return;
|
||||
* }
|
||||
* fire(1);
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @param name the robot name to check
|
||||
* @return {@code true} if the specified name belongs to one of your
|
||||
* teammates; {@code false} otherwise.
|
||||
* @see #getTeammates()
|
||||
* @see #broadcastMessage(Serializable)
|
||||
* @see #sendMessage(String, Serializable)
|
||||
*/
|
||||
public boolean isTeammate(String name) {
|
||||
if (peer != null) {
|
||||
return ((ITeamRobotPeer) peer).isTeammate(name);
|
||||
|
@ -63,6 +161,23 @@ public class TeamRobot extends AdvancedRobot implements ITeamRobot, ITeamEvents
|
|||
*/
|
||||
public void onMessageReceived(MessageEvent event) {}
|
||||
|
||||
/**
|
||||
* Sends a message to one (or more) teammates.
|
||||
* <p/>
|
||||
* Example:
|
||||
* <pre>
|
||||
* public void run() {
|
||||
* sendMessage("sample.DroidBot", "I'm here!");
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @param name the name of the intended recipient of the message
|
||||
* @param message the message to send
|
||||
* @throws IOException if the message could not be sent
|
||||
* @see #isTeammate(String)
|
||||
* @see #getTeammates()
|
||||
* @see #broadcastMessage(Serializable)
|
||||
*/
|
||||
public void sendMessage(String name, Serializable message) throws IOException {
|
||||
if (peer != null) {
|
||||
((ITeamRobotPeer) peer).sendMessage(name, message);
|
||||
|
|
|
@ -15,14 +15,108 @@ import java.io.Serializable;
|
|||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* The team robot peer for team robots like {@link robocode.TeamRobot}.
|
||||
* <p/>
|
||||
* A robot peer is the object that deals with game mechanics and rules, and
|
||||
* makes sure your robot abides by them.
|
||||
*
|
||||
* @see IBasicRobotPeer
|
||||
* @see IStandardRobotPeer
|
||||
* @see IAdvancedRobotPeer
|
||||
* @see IJuniorRobotPeer
|
||||
*
|
||||
* @author Pavel Savara (original)
|
||||
* @author Flemming N. Larsen (contributor)
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public interface ITeamRobotPeer extends IAdvancedRobotPeer {
|
||||
|
||||
|
||||
/**
|
||||
* Returns the names of all teammates, or {@code null} there is no
|
||||
* teammates.
|
||||
* <p/>
|
||||
* Example:
|
||||
* <pre>
|
||||
* public void run() {
|
||||
* // Prints out all teammates
|
||||
* String[] teammates = getTeammates();
|
||||
* if (teammates != null) {
|
||||
* for (String member : teammates) {
|
||||
* out.println(member);
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @return a String array containing the names of all your teammates, or
|
||||
* {@code null} if there is no teammates. The length of the String array
|
||||
* is equal to the number of teammates.
|
||||
* @see #isTeammate(String)
|
||||
* @see #broadcastMessage(Serializable)
|
||||
* @see #sendMessage(String, Serializable)
|
||||
*/
|
||||
String[] getTeammates();
|
||||
|
||||
/**
|
||||
* Checks if a given robot name is the name of one of your teammates.
|
||||
* <p/>
|
||||
* Example:
|
||||
* <pre>
|
||||
* public void onScannedRobot(ScannedRobotEvent e) {
|
||||
* if (isTeammate(e.getName()) {
|
||||
* return;
|
||||
* }
|
||||
* fire(1);
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @param name the robot name to check
|
||||
* @return {@code true} if the specified name belongs to one of your
|
||||
* teammates; {@code false} otherwise.
|
||||
* @see #getTeammates()
|
||||
* @see #broadcastMessage(Serializable)
|
||||
* @see #sendMessage(String, Serializable)
|
||||
*/
|
||||
boolean isTeammate(String name);
|
||||
|
||||
/**
|
||||
* Broadcasts a message to all teammates.
|
||||
* <p/>
|
||||
* Example:
|
||||
* <pre>
|
||||
* public void run() {
|
||||
* broadcastMessage("I'm here!");
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @param message the message to broadcast to all teammates
|
||||
* @throws IOException if the message could not be broadcasted to the
|
||||
* teammates
|
||||
* @see #isTeammate(String)
|
||||
* @see #getTeammates()
|
||||
* @see #sendMessage(String, Serializable)
|
||||
*/
|
||||
void broadcastMessage(Serializable message) throws IOException;
|
||||
|
||||
/**
|
||||
* Sends a message to one (or more) teammates.
|
||||
* <p/>
|
||||
* Example:
|
||||
* <pre>
|
||||
* public void run() {
|
||||
* sendMessage("sample.DroidBot", "I'm here!");
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @param name the name of the intended recipient of the message
|
||||
* @param message the message to send
|
||||
* @throws IOException if the message could not be sent
|
||||
* @see #isTeammate(String)
|
||||
* @see #getTeammates()
|
||||
* @see #broadcastMessage(Serializable)
|
||||
*/
|
||||
void sendMessage(String name, Serializable message) throws IOException;
|
||||
|
||||
/**
|
||||
|
|
|
@ -31,11 +31,16 @@ import robocode.control.events.RoundEndedEvent;
|
|||
import robocode.control.snapshot.BulletState;
|
||||
import robocode.control.snapshot.ITurnSnapshot;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.net.Socket;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
//+by Huchi
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
//-by Huchi
|
||||
|
||||
/**
|
||||
* The {@code Battle} class is used for controlling a battle.
|
||||
|
@ -53,6 +58,9 @@ public final class Battle extends BaseBattle {
|
|||
|
||||
private static final int DEBUG_TURN_WAIT_MILLIS = 10 * 60 * 1000; // 10 seconds
|
||||
|
||||
//by Huchi
|
||||
public static Socket socket;
|
||||
|
||||
private final IHostManager hostManager;
|
||||
private final long cpuConstant;
|
||||
|
||||
|
@ -94,10 +102,48 @@ public final class Battle extends BaseBattle {
|
|||
battleProps.getNumRounds(), battleProps.getGunCoolingRate(), battleProps.getInactivityTime(),
|
||||
battleProps.getHideEnemyNames(), battleProps.getSentryBorderSize());
|
||||
robotsCount = battlingRobotsList.length;
|
||||
|
||||
//+by Huchi
|
||||
try{
|
||||
socket = new Socket("localhost",4801);
|
||||
}catch(Exception e) {
|
||||
System.out.println("socket initialize failed:"+e);
|
||||
}
|
||||
//-by Huchi
|
||||
|
||||
computeInitialPositions(battleProps.getInitialPositions());
|
||||
createPeers(battlingRobotsList);
|
||||
}
|
||||
|
||||
//by Huchi
|
||||
public static void sendMsg(String toString){
|
||||
|
||||
try{
|
||||
|
||||
PrintWriter os=new PrintWriter(socket.getOutputStream());
|
||||
|
||||
//由Socket对象得到输出流,并构造PrintWriter对象
|
||||
|
||||
// BufferedReader is=new BufferedReader(new InputStreamReader(socket.getInputStream()));
|
||||
|
||||
//由Socket对象得到输入流,并构造相应的BufferedReader对象
|
||||
|
||||
String readline = toString;
|
||||
|
||||
os.println(readline);
|
||||
|
||||
os.flush();
|
||||
|
||||
System.out.println("Client:"+readline);
|
||||
|
||||
}catch(Exception e) {
|
||||
|
||||
System.out.println("Error"+e); //出错,则打印出错信息
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void createPeers(RobotSpecification[] battlingRobotsList) {
|
||||
// create teams
|
||||
Map<String, Integer> countedNames = new HashMap<String, Integer>();
|
||||
|
|
|
@ -1062,6 +1062,7 @@ public final class RobotPeer implements IRobotPeerBattle, IRobotPeer {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void checkWallCollision() {
|
||||
int minX = 0 + HALF_WIDTH_OFFSET;
|
||||
int minY = 0 + HALF_HEIGHT_OFFSET;
|
||||
|
@ -1082,7 +1083,7 @@ public final class RobotPeer implements IRobotPeerBattle, IRobotPeer {
|
|||
adjustX = maxX - x;
|
||||
angle = normalRelativeAngle(PI / 2 - bodyHeading);
|
||||
|
||||
} else if (y < minY) {
|
||||
}else if (y < minY) {
|
||||
hitWall = true;
|
||||
adjustY = minY - y;
|
||||
angle = normalRelativeAngle(PI - bodyHeading);
|
||||
|
@ -1438,8 +1439,11 @@ public final class RobotPeer implements IRobotPeerBattle, IRobotPeer {
|
|||
y += velocity * cos(bodyHeading);
|
||||
updateBoundingBox();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private double getDistanceTraveledUntilStop(double velocity) {
|
||||
double distance = 0;
|
||||
|
||||
|
|
|
@ -108,6 +108,11 @@ public class RobocodeSecurityManager extends SecurityManager {
|
|||
return;
|
||||
}
|
||||
|
||||
// Bug fix #382 Unable to run robocode.bat -- Access Control Exception
|
||||
if ("SeedGenerator Thread".equals(c.getName()) && "SeedGenerator ThreadGroup".equals(cg.getName())) {
|
||||
return; // The SeedGenerator might create a thread, which needs to be silently ignored
|
||||
}
|
||||
|
||||
IHostedThread robotProxy = threadManager.getLoadedOrLoadingRobotProxy(c);
|
||||
|
||||
if (robotProxy == null) {
|
||||
|
|
|
@ -41,7 +41,7 @@ public class AutoExtract implements ActionListener {
|
|||
|
||||
int p = s.indexOf(".");
|
||||
|
||||
if (p >= 0) {
|
||||
if (p < 0) {
|
||||
p = s.indexOf(".", p + 1);
|
||||
}
|
||||
if (p >= 0) {
|
||||
|
|
|
@ -201,7 +201,7 @@ public class BorderGuard extends AdvancedRobot implements BorderSentry {
|
|||
if (target != null) {
|
||||
// Prepare colors for painting the scanned coordinate and target coordinate
|
||||
color1 = new Color(0xFF, 0x7F, 0x00, 0x40); // Orange with 25% alpha blending
|
||||
color2 = new Color(0xFF, 0x00, 0x00, 0x80); // Red with 50% alpha blending
|
||||
color2 = new Color(0x00, 0xFF, 0x00, 0x80); // Red with 50% alpha blending
|
||||
|
||||
// Paint the two circles and a line
|
||||
fillCircle(g, target.scannedX, target.scannedY, color1); // scanned coordinate
|
||||
|
|
|
@ -218,8 +218,10 @@ public class RobocodeEditor extends JFrame implements Runnable, IRobocodeEditor
|
|||
}
|
||||
|
||||
private void createNewRobot(final String robotType) {
|
||||
String message = "Enter the name of your new robot.\nExample: MyFirst" + robotType
|
||||
+ "\nNote that the name cannot contain spaces.";
|
||||
final String ROBOT_NAME_DESCRIPTION = "Enter the name of your new robot.\nExample: MyFirst" + robotType
|
||||
+ "\nNote that the name cannot be empty or contain spaces.";
|
||||
|
||||
String message = ROBOT_NAME_DESCRIPTION;
|
||||
String name = "";
|
||||
|
||||
boolean done = false;
|
||||
|
@ -227,9 +229,13 @@ public class RobocodeEditor extends JFrame implements Runnable, IRobocodeEditor
|
|||
while (!done) {
|
||||
name = (String) JOptionPane.showInputDialog(this, message, "New " + robotType, JOptionPane.PLAIN_MESSAGE,
|
||||
null, null, name);
|
||||
name = (name == null) ? "" : name.trim();
|
||||
if (name == null) {
|
||||
return; // cancelled
|
||||
}
|
||||
name = name.trim();
|
||||
if (name.length() == 0) {
|
||||
return;
|
||||
message = ROBOT_NAME_DESCRIPTION;
|
||||
continue;
|
||||
}
|
||||
if (name.length() > MAX_ROBOT_NAME_LENGTH) {
|
||||
name = name.substring(0, MAX_ROBOT_NAME_LENGTH);
|
||||
|
@ -275,22 +281,28 @@ public class RobocodeEditor extends JFrame implements Runnable, IRobocodeEditor
|
|||
}
|
||||
}
|
||||
|
||||
message = "Enter a short package name for your new robot and without spaces (lower-case letters are prefered).\n"
|
||||
final String ROBOT_PACKAGE_NAME_DESCRIPTION = "Enter a short package name for your new robot and without spaces (lower-case letters are prefered).\n"
|
||||
+ "Your initials will work well here.\n"
|
||||
+ "Your robot will be put into this package to avoid name conflict with other robots.\n"
|
||||
+ "The package name is used to identify your robot(s) in the game, especially if you\n"
|
||||
+ "want to let your robot(s) participate in competitions like e.g. RoboRumble@Home.\n"
|
||||
+ "Hence, you should enter the same package name for all of your robots.";
|
||||
+ "Hence, you should enter the same package name for all of your robots.\n"
|
||||
+ "Note that the package name cannot be empty or contain spaces.";
|
||||
|
||||
message = ROBOT_PACKAGE_NAME_DESCRIPTION;
|
||||
String packageName = "";
|
||||
|
||||
done = false;
|
||||
while (!done) {
|
||||
packageName = (String) JOptionPane.showInputDialog(this, message, "Package name for " + name,
|
||||
JOptionPane.PLAIN_MESSAGE, null, null, packageName);
|
||||
packageName = (packageName == null) ? "" : packageName.trim();
|
||||
if (packageName == null) {
|
||||
return; // cancelled
|
||||
}
|
||||
packageName = packageName.trim();
|
||||
if (packageName.length() == 0) {
|
||||
return;
|
||||
message = ROBOT_PACKAGE_NAME_DESCRIPTION;
|
||||
continue;
|
||||
}
|
||||
if (packageName.length() > MAX_PACKAGE_NAME_LENGTH) {
|
||||
packageName = packageName.substring(0, MAX_PACKAGE_NAME_LENGTH);
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" path="src/main/resources" excluding="**/_svn/**|**/.svn/**|**/.git/**|**/*.java"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="src" path="/robocode.api"/>
|
||||
<classpathentry kind="src" path="/robocode.core"/>
|
||||
<classpathentry kind="var" path="M2_REPO/org/picocontainer/picocontainer/2.14.2/picocontainer-2.14.2.jar"/>
|
||||
<classpathentry kind="src" path="/robocode.battle"/>
|
||||
<classpathentry kind="src" path="/robocode.host"/>
|
||||
<classpathentry kind="src" path="/robocode.repository"/>
|
||||
<classpathentry kind="var" path="M2_REPO/net/sf/robocode/codesize/1.1/codesize-1.1.jar"/>
|
||||
<classpathentry kind="src" path="/robocode.sound"/>
|
||||
<classpathentry kind="src" path="src/main/java" />
|
||||
<classpathentry kind="src" path="src/main/resources"
|
||||
excluding="**/_svn/**|**/.svn/**|**/.git/**|**/*.java" />
|
||||
<classpathentry kind="output" path="target/classes" />
|
||||
<classpathentry kind="con"
|
||||
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" />
|
||||
<classpathentry kind="src" path="/robocode.api" />
|
||||
<classpathentry kind="src" path="/robocode.core" />
|
||||
<classpathentry kind="var"
|
||||
path="M2_REPO/org/picocontainer/picocontainer/2.14.2/picocontainer-2.14.2.jar" />
|
||||
<classpathentry kind="src" path="/robocode.battle" />
|
||||
<classpathentry kind="src" path="/robocode.host" />
|
||||
<classpathentry kind="src" path="/robocode.repository" />
|
||||
<classpathentry kind="var"
|
||||
path="M2_REPO/net/sf/robocode/codesize/1.1/codesize-1.1.jar" />
|
||||
<classpathentry kind="src" path="/robocode.sound" />
|
||||
</classpath>
|
|
@ -1,7 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>robocode.ui</name>
|
||||
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
|
||||
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the
|
||||
maven-eclipse-plugin are not supported in M2Eclipse.</comment>
|
||||
<projects>
|
||||
<project>robocode.api</project>
|
||||
<project>robocode.core</project>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>robocode.ui</artifactId>
|
||||
<name>Robocode UI</name>
|
||||
|
|
|
@ -34,7 +34,9 @@ import java.awt.event.ComponentEvent;
|
|||
import java.awt.geom.*;
|
||||
import java.awt.image.BufferStrategy;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
import static java.lang.Math.*;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
|
@ -104,7 +106,7 @@ public class BattleView extends Canvas {
|
|||
this.windowManager = (IWindowManagerExt) windowManager;
|
||||
this.imageManager = imageManager;
|
||||
|
||||
battleField = new BattleField(800, 600);
|
||||
battleField = new BattleField(100, 100);
|
||||
|
||||
new BattleObserver(windowManager);
|
||||
|
||||
|
@ -369,7 +371,7 @@ public class BattleView extends Canvas {
|
|||
private void drawSentryBorder(Graphics2D g) {
|
||||
int borderSentrySize = battleRules.getSentryBorderSize();
|
||||
|
||||
g.setColor(new Color(0xff, 0x00, 0x00, 0x80));
|
||||
g.setColor(new Color(0x00, 0xff, 0x00, 0x80));
|
||||
g.fillRect(0, 0, borderSentrySize, battleField.getHeight());
|
||||
g.fillRect(battleField.getWidth() - borderSentrySize, 0, borderSentrySize, battleField.getHeight());
|
||||
g.fillRect(borderSentrySize, 0, battleField.getWidth() - 2 * borderSentrySize, borderSentrySize);
|
||||
|
@ -382,8 +384,11 @@ public class BattleView extends Canvas {
|
|||
|
||||
g.setClip(null);
|
||||
|
||||
g.setColor(Color.RED);
|
||||
g.drawRect(-1, -1, battleField.getWidth() + 2, battleField.getHeight() + 2);
|
||||
g.setColor(Color.BLUE);
|
||||
g.drawRect(-1, -1, battleField.getWidth() + 500, battleField.getHeight() + 500);
|
||||
|
||||
g.setColor(Color.BLUE);
|
||||
g.drawRect(200, 200, 300, 300);
|
||||
|
||||
g.setClip(savedClip);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
|
||||
/**
|
||||
* Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://robocode.sourceforge.net/license/epl-v10.html
|
||||
*/
|
||||
package net.sf.robocode.ui.dialog;
|
||||
|
||||
|
||||
|
@ -22,7 +28,14 @@ import java.awt.event.InputEvent;
|
|||
import java.awt.event.KeyEvent;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Handles menu display and interaction for Robocode.
|
||||
*
|
||||
* @author Mathew A. Nelson (original)
|
||||
* @author Flemming N. Larsen (contributor)
|
||||
* @author Matthew Reeder (contributor)
|
||||
* @author Luis Crespo (contributor)
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MenuBar extends JMenuBar {
|
||||
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
|
||||
/**
|
||||
* Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://robocode.sourceforge.net/license/epl-v10.html
|
||||
*/
|
||||
package net.sf.robocode.ui.dialog;
|
||||
|
||||
|
||||
|
@ -20,7 +26,11 @@ import java.net.MalformedURLException;
|
|||
import java.net.URL;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author Mathew A. Nelson (original)
|
||||
* @author Matthew Reeder (contributor)
|
||||
* @author Flemming N. Larsen (contributor)
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class TeamCreator extends JDialog implements WizardListener {
|
||||
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
|
||||
/**
|
||||
* Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://robocode.sourceforge.net/license/epl-v10.html
|
||||
*/
|
||||
package net.sf.robocode.ui.dialog;
|
||||
|
||||
|
||||
|
@ -18,7 +24,11 @@ import java.net.URL;
|
|||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author Mathew A. Nelson (original)
|
||||
* @author Flemming N. Larsen (contributor)
|
||||
* @author Robert D. Maupin (contributor)
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class TeamCreatorOptionsPanel extends WizardPanel {
|
||||
private TeamCreator teamCreator;
|
||||
|
@ -305,7 +315,11 @@ public class TeamCreatorOptionsPanel extends WizardPanel {
|
|||
return teamPackageLabel;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the teamPackage.
|
||||
*
|
||||
* @return Returns a String
|
||||
*/
|
||||
public String getTeamPackage() {
|
||||
return (teamPackage != null) ? teamPackage : ".";
|
||||
}
|
||||
|
|
|
@ -11,125 +11,208 @@
|
|||
<style>
|
||||
body {
|
||||
background-color: lightgray;
|
||||
font-family:sans-serif;
|
||||
font-size:9px;
|
||||
margin-bottom:3px;
|
||||
font-family: sans-serif;
|
||||
font-size: 9px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size:11px;
|
||||
margin-bottom:3px;
|
||||
font-size: 11px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size:10px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.contributor {
|
||||
font-weight:bold;
|
||||
color:green;
|
||||
font-weight: bold;
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body bgcolor="{$background-color}" leftmargin="5px" topmargin="5px" marginwidth="5px" marginheight="5px">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><img src="{$robocode-icon-url}" align="middle"></td>
|
||||
<td class="title">
|
||||
Robocode version {$robocode-version}
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr><td><img src="{$transparent}" width="1" height="5" border="0"></td></tr>
|
||||
</table>
|
||||
© Copyright 2001-2016 Robocode contributors. All rights reserved.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<body bgcolor="{$background-color}" leftmargin="5px" topmargin="5px"
|
||||
marginwidth="5px" marginheight="5px">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><img src="{$robocode-icon-url}" align="middle"></td>
|
||||
<td class="title"> Robocode version
|
||||
{$robocode-version}
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td><img src="{$transparent}" width="1" height="5" border="0"></td>
|
||||
</tr>
|
||||
</table> © Copyright 2001-2016 Robocode contributors. All
|
||||
rights reserved.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr><td><img src="{$transparent}" width="1" height="3" border="0"></td></tr>
|
||||
</table>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td><img src="{$transparent}" width="1" height="3" border="0"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<strong>Original Author:</strong> <span class="contributor">Mathew A. Nelson</span>.
|
||||
|
||||
<strong>Original Graphics:</strong> <span class="contributor">Garett S. Hourihan</span>.
|
||||
<strong>Original Author:</strong>
|
||||
<span class="contributor">Mathew A. Nelson</span>.
|
||||
|
||||
<strong>Original Graphics:</strong>
|
||||
<span class="contributor">Garett S. Hourihan</span>.
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr><td><img src="{$transparent}" width="1" height="10" border="0"></td></tr>
|
||||
</table>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td><img src="{$transparent}" width="1" height="10" border="0"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Running on <strong>Java {$java-version}</strong> by {$java-vendor} |
|
||||
<a href="http://www.java.com/en/download/index.jsp">Download</a> |
|
||||
<a href="http://docs.oracle.com/javase/6/docs/api/">Java 6 API documentation</a><br>
|
||||
Running on
|
||||
<strong>Java {$java-version}</strong> by
|
||||
{$java-vendor} |
|
||||
<a href="http://www.java.com/en/download/index.jsp">Download</a> |
|
||||
<a href="http://docs.oracle.com/javase/6/docs/api/">Java 6 API
|
||||
documentation</a>
|
||||
<br>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr><td><img src="{$transparent}" width="1" height="10" border="0"></td></tr>
|
||||
<tr><td bgcolor="black"><img src="{$transparent}" width="1" height="2" border="0"></td></tr>
|
||||
<tr><td><img src="{$transparent}" width="1" height="4" border="0"></td></tr>
|
||||
</table>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td><img src="{$transparent}" width="1" height="10" border="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="black"><img src="{$transparent}" width="1"
|
||||
height="2" border="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="{$transparent}" width="1" height="4" border="0"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<a href="http://robocode.sourceforge.net/docs/ReadMe.html">ReadMe</a>
|
||||
|
|
||||
<a href="http://robocode.sourceforge.net/license/epl-v10.html">License</a>
|
||||
|
|
||||
<a href="http://robocode.sourceforge.net/">Home Page</a>
|
||||
|
|
||||
<a href="http://sourceforge.net/projects/robocode/">Project Home</a>
|
||||
|
|
||||
<a href="http://github.com/robo-code/robocode/blob/master/versions.md">Versions</a>
|
||||
|
|
||||
<a href="http://robo-code.blogspot.com/">News</a>
|
||||
|
|
||||
<a href="http://robowiki.net">RoboWiki</a>
|
||||
|
|
||||
<a href="http://robocoderepository.com/">Robocode Repository</a>
|
||||
|
|
||||
<a href="https://groups.google.com/forum/?fromgroups#!forum/robocode-developers">Robocode Developers</a>
|
||||
<br>
|
||||
<a href="http://sourceforge.net/projects/robocode/files/">Download</a>
|
||||
|
|
||||
<a href="http://robowiki.net/w/index.php?title=Robocode/Getting_Started">Getting started</a>
|
||||
|
|
||||
<a href="http://robocode.sourceforge.net/docs/robocode/">Java API</a>
|
||||
|
|
||||
<a href="http://robocode.sourceforge.net/docs/robocode.dotnet/Index.html">.NET API</a>
|
||||
|
|
||||
<a href="http://robowiki.net/w/index.php?title=Robocode/FAQ">FAQ</a>
|
||||
|
|
||||
<a href="https://groups.google.com/forum/?fromgroups#!forum/robocode">Google Group</a>
|
||||
|
|
||||
<a href="http://sourceforge.net/p/robocode/discussion/116459/">Help Forum</a>
|
||||
|
|
||||
<a href="http://sourceforge.net/p/robocode/bugs/">Bug Reports</a>
|
||||
|
|
||||
<a href="http://sourceforge.net/p/robocode/feature-requests/">Feature Requests</a>
|
||||
<a href="http://robocode.sourceforge.net/docs/ReadMe.html">ReadMe</a>
|
||||
|
|
||||
<a href="http://robocode.sourceforge.net/license/epl-v10.html">License</a>
|
||||
|
|
||||
<a href="http://robocode.sourceforge.net/">Home Page</a> |
|
||||
<a href="http://sourceforge.net/projects/robocode/">Project Home</a>
|
||||
|
|
||||
<a href="http://github.com/robo-code/robocode/blob/master/versions.md">Versions</a>
|
||||
|
|
||||
<a href="http://robo-code.blogspot.com/">News</a> |
|
||||
<a href="http://robowiki.net">RoboWiki</a> |
|
||||
<a href="http://robocoderepository.com/">Robocode Repository</a>
|
||||
|
|
||||
<a
|
||||
href="https://groups.google.com/forum/?fromgroups#!forum/robocode-developers">Robocode
|
||||
Developers</a>
|
||||
<br>
|
||||
<a href="http://sourceforge.net/projects/robocode/files/">Download</a>
|
||||
|
|
||||
<a
|
||||
href="http://robowiki.net/w/index.php?title=Robocode/Getting_Started">Getting
|
||||
started</a> |
|
||||
<a href="http://robocode.sourceforge.net/docs/robocode/">Java API</a>
|
||||
|
|
||||
<a
|
||||
href="http://robocode.sourceforge.net/docs/robocode.dotnet/Index.html">.NET
|
||||
API</a> |
|
||||
<a href="http://robowiki.net/w/index.php?title=Robocode/FAQ">FAQ</a>
|
||||
|
|
||||
<a href="https://groups.google.com/forum/?fromgroups#!forum/robocode">Google
|
||||
Group</a> |
|
||||
<a href="http://sourceforge.net/p/robocode/discussion/116459/">Help
|
||||
Forum</a> |
|
||||
<a href="http://sourceforge.net/p/robocode/bugs/">Bug Reports</a>
|
||||
|
|
||||
<a href="http://sourceforge.net/p/robocode/feature-requests/">Feature
|
||||
Requests</a>
|
||||
|
||||
<h2>Main Contributors</h2>
|
||||
<span class="contributor">Mathew A. Nelson</span>: Original developer (2001-2005)<br>
|
||||
<span class="contributor">Flemming N. Larsen</span>: Administrator, developer, integrator, lots of features (2005-2016)<br>
|
||||
<span class="contributor">Pavel Savara</span>: Administrator, developer, integrator, robot interfaces, refactorings, .NET plugin (2008-2011)<br>
|
||||
<h2>Main Contributors</h2>
|
||||
<span class="contributor">Mathew A. Nelson</span>: Original developer
|
||||
(2001-2005)
|
||||
<br>
|
||||
<span class="contributor">Flemming N. Larsen</span>: Administrator,
|
||||
developer, integrator, lots of features (2005-2016)
|
||||
<br>
|
||||
<span class="contributor">Pavel Savara</span>: Administrator,
|
||||
developer, integrator, robot interfaces, refactorings, .NET plugin
|
||||
(2008-2011)
|
||||
<br>
|
||||
|
||||
<h2>Contributors</h2>
|
||||
<span class="contributor">Aaron Rotenberg</span>: Robot Cache Cleaner utility<br>
|
||||
<span class="contributor">Albert Perez</span>: RoboRumble@Home client<br>
|
||||
<span class="contributor">Alexander Schultz</span>: Reporting lots of bugs and good solutions for fixing these<br>
|
||||
<span class="contributor">Ascander Jr</span>: Graphics for background tiles<br>
|
||||
<span class="contributor">Christian D. Schnell</span>: Codesize 1.0 utility<br>
|
||||
<span class="contributor">Cubic Creative</span>: Design and ideas for the JuniorRobot class<br>
|
||||
<span class="contributor">Dan Lynn</span>: The Robocode Repository that is the central place for storing your robots and also find other robots<br>
|
||||
<span class="contributor">Endre Palatinus</span>, <span class="contributor">Eniko Nagy</span>, <span class="contributor">Attila Csizofszki</span> and <span class="contributor">Laszlo Vigh</span>: Score percentage in results/rankings<br>
|
||||
<span class="contributor">Jerome Lavigne</span>: Added "Smart Battles" to MeleeRumble, developer and admin of the RoboRumble server<br>
|
||||
<span class="contributor">Joachim Hofer</span>: Fixing problem with wrong results in RoboRumble<br>
|
||||
<span class="contributor">Joshua Galecki</span>: Added the RateControlRobot<br>
|
||||
<span class="contributor">Julian Kent</span>: Nano precision timing of allowed robot time<br>
|
||||
<span class="contributor">Luis Crespo</span>: Sound engine, single-step debugging, ranking panel<br>
|
||||
<span class="contributor">Matthew Reeder</span>: Editor enhancements, keyboard shortcuts, HyperThreading bugfixes<br>
|
||||
<span class="contributor">Nathaniel Troutman</span>: Fixing memory leaks<br>
|
||||
<span class="contributor">Patrick Cupka</span>, <span class="contributor">Julian Kent</span>, <span class="contributor">Nat Pavasant</span>, and <span class="contributor">"Positive"</span>: Redesigned robot movement method<br><span class="contributor">Robert D. Maupin</span>: Optimizations with collections and improved CPU constant benchmark<br>
|
||||
<span class="contributor">Ruben Moreno Montoliu</span>: Added paths with buttons to Developement Options<br>
|
||||
<span class="contributor">Stefan Westen</span>: onPaint method from RobocodeSG<br>
|
||||
<span class="contributor">Titus Chen</span>: Bugfixes for robot teleportation, bad wall collision detection, team ranking, replay scores and robot color flickering<br>
|
||||
<span class="contributor">Tuan Anh Nguyen</span>: Interactive_v2 sample robot
|
||||
<h2>Contributors</h2>
|
||||
<span class="contributor">Aaron Rotenberg</span>: Robot Cache Cleaner
|
||||
utility
|
||||
<br>
|
||||
<span class="contributor">Albert Perez</span>: RoboRumble@Home client
|
||||
<br>
|
||||
<span class="contributor">Alexander Schultz</span>: Reporting lots of
|
||||
bugs and good solutions for fixing these
|
||||
<br>
|
||||
<span class="contributor">Ascander Jr</span>: Graphics for background
|
||||
tiles
|
||||
<br>
|
||||
<span class="contributor">Christian D. Schnell</span>: Codesize 1.0
|
||||
utility
|
||||
<br>
|
||||
<span class="contributor">Cubic Creative</span>: Design and ideas for
|
||||
the JuniorRobot class
|
||||
<br>
|
||||
<span class="contributor">Dan Lynn</span>: The Robocode Repository that
|
||||
is the central place for storing your robots and also find other robots
|
||||
<br>
|
||||
<span class="contributor">Endre Palatinus</span>,
|
||||
<span class="contributor">Eniko Nagy</span>,
|
||||
<span class="contributor">Attila Csizofszki</span> and
|
||||
<span class="contributor">Laszlo Vigh</span>: Score percentage in
|
||||
results/rankings
|
||||
<br>
|
||||
<span class="contributor">Jerome Lavigne</span>: Added "Smart Battles"
|
||||
to MeleeRumble, developer and admin of the RoboRumble server
|
||||
<br>
|
||||
<span class="contributor">Joachim Hofer</span>: Fixing problem with
|
||||
wrong results in RoboRumble
|
||||
<br>
|
||||
<span class="contributor">Joshua Galecki</span>: Added the
|
||||
RateControlRobot
|
||||
<br>
|
||||
<span class="contributor">Julian Kent</span>: Nano precision timing of
|
||||
allowed robot time
|
||||
<br>
|
||||
<span class="contributor">Luis Crespo</span>: Sound engine, single-step
|
||||
debugging, ranking panel
|
||||
<br>
|
||||
<span class="contributor">Matthew Reeder</span>: Editor enhancements,
|
||||
keyboard shortcuts, HyperThreading bugfixes
|
||||
<br>
|
||||
<span class="contributor">Nathaniel Troutman</span>: Fixing memory
|
||||
leaks
|
||||
<br>
|
||||
<span class="contributor">Patrick Cupka</span>,
|
||||
<span class="contributor">Julian Kent</span>,
|
||||
<span class="contributor">Nat Pavasant</span>, and
|
||||
<span class="contributor">"Positive"</span>: Redesigned robot movement
|
||||
method
|
||||
<br>
|
||||
<span class="contributor">Robert D. Maupin</span>: Optimizations with
|
||||
collections and improved CPU constant benchmark
|
||||
<br>
|
||||
<span class="contributor">Ruben Moreno Montoliu</span>: Added paths
|
||||
with buttons to Developement Options
|
||||
<br>
|
||||
<span class="contributor">Stefan Westen</span>: onPaint method from
|
||||
RobocodeSG
|
||||
<br>
|
||||
<span class="contributor">Titus Chen</span>: Bugfixes for robot
|
||||
teleportation, bad wall collision detection, team ranking, replay
|
||||
scores and robot color flickering
|
||||
<br>
|
||||
<span class="contributor">Tuan Anh Nguyen</span>: Interactive_v2 sample
|
||||
robot
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr><td><img src="{$transparent}" width="1" height="10" border="0"></td></tr>
|
||||
</table>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td><img src="{$transparent}" width="1" height="10" border="0"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<strong>Thanks goes to every contributor as well to all users reporting bugs and suggesting new features for Robocode.</strong>
|
||||
<strong>Thanks goes to every contributor as well to all users
|
||||
reporting bugs and suggesting new features for Robocode.</strong>
|
||||
</body>
|
|
@ -13,8 +13,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
|
|||
</organization>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>cp1252</project.build.sourceEncoding>
|
||||
<robocode.version>1.9.2.5</robocode.version> <!-- Any string, but no spaces (use '-' instead of space) -->
|
||||
<robocode.dotnet.version>1.9.2.5</robocode.dotnet.version> <!-- Only X.X.X.X format -->
|
||||
<robocode.version>1.9.2.6-Alpha</robocode.version> <!-- Any string, but no spaces (use '-' instead of space) -->
|
||||
<robocode.dotnet.version>1.9.2.6</robocode.dotnet.version> <!-- Only X.X.X.X format -->
|
||||
<javadoc.additionalparam/>
|
||||
</properties>
|
||||
<repositories>
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## Version 1.9.2.6 Alpha (17-05-2016)
|
||||
* [Bug-381][]: Improve feedback after entering empty package name during robot creation.
|
||||
* [Bug-382][]: Unable to run robocode.bat -- Access Control Exception.
|
||||
|
||||
## Version 1.9.2.5 (30-Dec-2015)
|
||||
|
||||
### Bug fixes
|
||||
|
@ -2998,6 +3002,8 @@ Currently, there is one known issue, which will be fixed with the next Beta or i
|
|||
[Bug-375]: http://sourceforge.net/p/robocode/bugs/375/ (Wrong width and height returned for .NET robots)
|
||||
[Bug-378]: http://sourceforge.net/p/robocode/bugs/378/ (robocode.robocodeGL.system.GLRenderer ClassNotFoundException)
|
||||
[Bug-380]: http://sourceforge.net/p/robocode/bugs/380/ (Yet another historical bot related bug)
|
||||
[Bug-381]: http://sourceforge.net/p/robocode/bugs/381/ (Improve feedback after entering empty package name during robot creation)
|
||||
[Bug-382]: http://sourceforge.net/p/robocode/bugs/382/ (Unable to run robocode.bat -- Access Control Exception)
|
||||
|
||||
[Req-1]: http://sourceforge.net/p/robocode/feature-requests/1/ (Multiple or hyperthreading CPUs (most P4s) hangs Robocode)
|
||||
[Req-2]: http://sourceforge.net/p/robocode/feature-requests/2/ (Keep window size of "New battle" window)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue