ム板のみんなでRobocode (・∀・)ヤローウヨ!1台目
■ このスレッドは過去ログ倉庫に格納されています
0033デフォルトの名無しさん
NGNG{
/**
* run: Sample's default behavior
*/
public void run() {
// After trying out your robot, try uncommenting the import at the top,
// and the next line:
//setColors(Color.red,Color.blue,Color.green);
while(true) {
// Replace the next 4 lines with any behavior you would like
turnGunRight(8);
}
}
/**
* onScannedRobot: What to do when you see another robot
*/
public void onScannedRobot(ScannedRobotEvent e) {
fire(1);
}
/**
* onHitByBullet: What to do when you're hit by a bullet
*/
public void onHitByBullet(HitByBulletEvent e) {
back(100);
}
/**
* onHitRobot: What to do when you hit other robot
*/
public void onHitRobot(HitRobotEvent e){
fire(3);
}
/**
* onHitWall: What to do when you are close by wall
*/
public void onHitWall(HitWallEvent e){
turnRight(e.getBearing());
back(900);
}
}
的に弾に当たったときに連射をしません。
どうしてでしょうか?
またどのように対処すればよいのでしょうか?
お願いします。
■ このスレッドは過去ログ倉庫に格納されています