资源简介
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个文件信息
相关资源
- java串口通信全套完整代码-导入eclip
- android带百分比进度条的文件上传,使
- 当当网完整项目、包括js、css、html
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- pc与android通过usb socket实现手机通信
- commons-beanutils-1.8.3.jar
- ehcache-core-2.5.1.jar
- java Socket发送/接受报文
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- JSP,SQL,MVC的选课系统
- 基于jsp的bbs论坛 非常详细
- 基于C/S架构考试系统(Java)
- java access 仓库管理系统 源码
- DES(CFB) JAVA
- jsp oracle通讯录
- java sql2008的图书馆管理系统
- android通过JDBC连接Mysql数据库
- CMM_词法分析和语法分析_java编写
- 指纹传感器FPC1080在android下的驱动
- delphi xe5 android 调用照相机摄像头拍照
- java端口扫描程序
- Java版聊天程序(UDP TCP 多线程)
- 简单qq聊天(Java socket实现)
- java多人五子棋源码
- JSP课程设计-留言本 jsp mysql tomcat实现
- 用Java实现TCP通信
- 采用TCP SOCKET技术编写C/S模式的java聊天
- java 局域网数据包嗅探
评论
共有 条评论