forked from xathis/AI-Challenge-2011-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnt.java
59 lines (40 loc) · 1.23 KB
/
Ant.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
57
58
59
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.TreeMap;
public class Ant {
public Tile tile;
public boolean isDangered;
public boolean isIndirectlyDangered;
public boolean hasMoved;
public boolean hasMission;
public boolean isDetached = true;
public TreeMap<Integer, Ant> closeEnemyDists = new TreeMap<Integer, Ant>();
public Tile closestEnemyTile;
public int closeEnemyDistsSum = 0;
public Ant closestEnemy;
public int closestEnemyDist = Integer.MAX_VALUE;
public int numCloseEnemies = 0;
public LinkedList<Ant> gammaDistEnemies = new LinkedList<Ant>();
public boolean isDead;
public int weakness = 0;
public boolean isReached = false;
public boolean isGrouped = false;
public boolean isGammaGrouped = false;
public Tile currTo = null;
public Tile bestTo = null;
public int compValue;
public Strategy.Mission mission;
public int numCloseOwnAnts = 0;
public boolean willStay = false;
public HashMap<Tile, List<Tile>> depTable;
public boolean checkAll;
public LinkedList<Tile> checkNeighbors;
public HashMap<Tile, Integer> distMap;
public Ant(Tile tile) {
this.tile = tile;
}
public String toString() {
return "[Ant " + tile.toString() + "]";
}
}