-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTurret.java
56 lines (47 loc) · 1.08 KB
/
Turret.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package team022;
import battlecode.common.*;
public class Turret extends BaseRobot {
public Turret(RobotController rcin) {
super(rcin);
// TODO Auto-generated constructor stub
}
//Note: if spawned as a turret, then our strategy is turrtling
@Override
public void run() {
while(true){
rc.setIndicatorString(0, "");
for(Signal Message: rc.emptySignalQueue()){
if(Message.getMessage() != null){
if(ComSystem.getFlag(Message) == 0x42){
rc.setIndicatorString(0, "Pack it up boys");
try {
rc.pack();
} catch (GameActionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
TTM Temp = new TTM(rc);
Temp.run_ret(Message.getLocation());
}
break;
}
}
/*
for(RobotInfo stuff : rc.senseNearbyRobots(2, rc.getTeam())){
if(stuff.type == RobotType.TTM){
TTM Temp = new TTM(rc);
Temp.run_ret();
break;
}
}*/
try {
destroy();
} catch (GameActionException e) {
e.printStackTrace();
}
Clock.yield();
}
}
public void destroyTheDen(){
}
}