资源简介
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个文件信息
相关资源
- springboot2.0+spring cloud+eureka(分布式项
- 前端开发(uCharts)大全
- jacob 1.19
- jsp+servlet+jdbc开发学生信息后台管理系
- 安全测试工具ysoserial
- 计算机网络CRC循环冗余检测系统
- 泛微OA维护手册.docx
- websockets实现tomcat日志在线输出
- Java TCP IP Socket
- jdk和cglib动态代理的{jar包+源码}
- cglib-2.2.2.jar 和 asm-all-3.0.jar
- cglibjar包
- hpsocket demo
- 传智itcast-bookstore所需jar包
- spring boot+ios app+android app 即时通讯项目
- Vue项目实现手机端上传图片,使用于
- mysql-connector-java-5.0.8-bin驱动jar
- 关于CommVault统一数据管理方案
- 基于CenGRP3.0 烟草行业企业整合解决方
- mac版adb工具
- 官方mysql-connector-java-5.1.28-bin.jar
- mysql-connector-java-5.1.17.jar
- JAVA 用的 PCSC
- pcsc协议以及测试程序
- NFC Card万能读卡android程序
- java实现生成Excel默认.xls,可自己修改
- mysql与java连接的适配包mysql-connector-
- Java Generics and Collections.pdf
- Advanced Design and Implementation of Virtual
- Android安卓中文API开发文档参考手册官
评论
共有 条评论