• 大小: 6.34MB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2022-03-26
  • 语言: Java
  • 标签: AI-TANK  c++  c  c#  

资源简介

AI-TANK 仿真机器人程序_学习资料及样本C C# C++ java 源代码 ai-tank 网上搜一下 很有意思的东西 很有研究价值~~

资源截图

代码片段和文件信息

/*
 * Created on 2005-1-10
 */
package iiley;

import iiley.gun.CigaretGun;
import iiley.move.CigaretMove;
import iiley.utils.VDDBPatternFactory;

import java.awt.Color;
import java.awt.geom.Point2D;

import org.robochina.airobot.tank.AdvancedRobot;
import org.robochina.airobot.tank.Bot;
import org.robochina.airobot.tank.FireAction;
import org.robochina.airobot.tank.HitedByBulletAction;
import org.robochina.airobot.tank.RectangleView;
import org.robochina.airobot.tank.TextView;

/**
 *+++++++++++++++++++++++++++Author Info++++++++++++++++++++++++++
 *--
 * @author:iiley (iiley@hotmail.com)
 * http://www.robochina.org
 *--
 * For livingI fish out a cigaretsmoke and spit a circle smog...
 * Hi~catch a cigaret!
 *++++++++++++++++++++++++++++++++Versions++++++++++++++++++++++++
 *--
  *--------------------version 1.0 2005.1.10--------------
 * Transplant from my robocode robot cx.mini.Cigaret it‘s a minibot
 * in robocode world however in AIRobot there is not splition of size.
 * It used to be  a very stronge minibot ranked #1 in 1v1 mini and #2 in 
 * general for a long time in Eternal-Rumble.
 * This AIRobot version just transplanted the main strategy removed some
 * invalid specific from robocode to AIRobot like ram and anti-ram. 
 *--
 *+++++++++++++++++++++++++++++++++future++++++++++++++++++++++++++++++++
 *--
 * future:wellwhat the better?!
 *--
 *+++++++++++++++++++++++++++++++++Open Source+++++++++++++++++++++++++++
 *--
 * This bot is open source. 
 * - Don‘t just copy-paste the code .
 * - Don‘t just copy-paste and then improve.(I don‘t want to fight modified versions of my own bot)
 * - Maybe some useful skill in this codesif you useMake your bot open source
 * - And preferably give credit.:)
 *
 * If you want to know more or suggest
 * email me or post messages on www.robochina.org forums.
 * every messages will be pleasent.
 *--
 */
public class Cigaret extends AdvancedRobot {
/**
 * 初始化所有的listener
 */
public void initListener(){
this.addListener(new CigaretMove(this));
this.addListener(new CigaretGun(this new VDDBPatternFactory(this)));
}

/* (non-Javadoc)
 * @see org.robochina.airobot.tank.AdvancedRobot#onHitedByBullet(org.robochina.airobot.tank.HitedByBulletAction)
 */
public void onHitedByBullet(HitedByBulletAction action) {
super.onHitedByBullet(action);
int ownerID = action.getBullet().getOwner();
Bot owner = getBot(ownerID);
this.addView(new TextView(
“och! “ + owner.getName() + “ “ + action.getBullet().getPower()
getLocation()
18
Color.YELLOW
30));
}



/* (non-Javadoc)
 * @see org.robochina.airobot.tank.AdvancedRobot#onFire(org.robochina.airobot.tank.FireAction)
 */
public void onFire(FireAction action) {
super.onFire(action);
Point2D pos = action.getBullet().getFireLocation();
double power = action.getBullet().getPower();
addView(new RectangleView(
pos 
powe

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2865  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Cigaret.class

     文件       4998  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Cigaret.class_body.png

     文件        457  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Cigaret.class_gun.png

     文件       3218  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Cigaret.java

     文件        856  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\gun\CigaretGun$DefaultFirePowerStrategy.class

     文件       5428  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\gun\CigaretGun.class

     文件       5518  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\gun\CigaretGun.java

     文件       1778  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\gun\HOTClosest.class

     文件       1413  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\gun\HOTClosest.java

     文件       2547  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\move\AntiGravityMove.class

     文件       2086  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\move\AntiGravityMove.java

     文件       4043  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\move\CigaretMove.class

     文件       4156  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\move\CigaretMove.java

     文件       2920  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\move\SmokeMove.class

     文件       2560  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\move\SmokeMove.java

     文件       1151  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Smoke$SmokeFirePowerStrategy.class

     文件       1126  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Smoke.class

     文件       1972  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Smoke.class_body.png

     文件       1633  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Smoke.class_gun.png

     文件       1442  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Smoke.java

     文件       1146  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Smoke2$SmokeFirePowerStrategy.class

     文件       1130  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Smoke2.class

     文件       1439  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Smoke2.java

     文件        845  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Trochoid.class

     文件        543  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\Trochoid.java

     文件        688  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\utils\AbsPatternFactory.class

     文件        684  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\utils\AbsPatternFactory.java

     文件        216  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\utils\FirePowerStrategy.class

     文件        225  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\utils\FirePowerStrategy.java

     文件        197  2006-06-19 20:34  AI-TANK_学习资料\AI-TANK_学习资料\参考实例\iiley\iiley\utils\Pattern.class

............此处省略342个文件信息

评论

共有 条评论