11package battlecode .world ;
22
3- import battlecode .common .GameConstants ;
3+ // import battlecode.common.GameConstants;
44import battlecode .common .MapLocation ;
55import battlecode .common .UnitType ;
66import battlecode .common .Team ;
77
88import gnu .trove .TIntArrayList ;
99import gnu .trove .TIntObjectHashMap ;
10- import gnu .trove .TIntObjectProcedure ;
11- import gnu .trove .TIntProcedure ;
10+ // import gnu.trove.TIntObjectProcedure;
11+ // import gnu.trove.TIntProcedure;
1212
1313import gnu .trove .TObjectProcedure ;
14- import com .infomatiq .jsi .SpatialIndex ;
15- import com .infomatiq .jsi .rtree .RTree ;
16- import com .infomatiq .jsi .Rectangle ;
17- import com .infomatiq .jsi .Point ;
14+ // import com.infomatiq.jsi.SpatialIndex;
15+ // import com.infomatiq.jsi.rtree.RTree;
16+ // import com.infomatiq.jsi.Rectangle;
17+ // import com.infomatiq.jsi.Point;
1818
19- import java .util .ArrayList ;
20- import java .util .Collection ;
19+ // import java.util.ArrayList;
20+ // import java.util.Collection;
2121import java .util .EnumMap ;
2222import java .util .Map ;
2323
2626 * in the game world.
2727 */
2828public class ObjectInfo {
29- private final int mapWidth ;
30- private final int mapHeight ;
31- private final MapLocation mapTopLeft ;
29+ // private final int mapWidth;
30+ // private final int mapHeight;
31+ // private final MapLocation mapTopLeft;
3232
3333 private final TIntObjectHashMap <InternalRobot > gameRobotsByID ;
3434
35- private SpatialIndex robotIndex ;
35+ // private SpatialIndex robotIndex;
3636
3737 private final TIntArrayList dynamicBodyExecOrder ;
3838
@@ -41,17 +41,17 @@ public class ObjectInfo {
4141 private int [] robotCount = new int [3 ];
4242
4343 public ObjectInfo (LiveMap gm ) {
44- this .mapWidth = gm .getWidth ();
45- this .mapHeight = gm .getHeight ();
46- this .mapTopLeft = gm .getOrigin ();
44+ // this.mapWidth = gm.getWidth();
45+ // this.mapHeight = gm.getHeight();
46+ // this.mapTopLeft = gm.getOrigin();
4747
4848 this .gameRobotsByID = new TIntObjectHashMap <>();
4949
50- robotIndex = new RTree ();
50+ // robotIndex = new RTree();
5151
5252 dynamicBodyExecOrder = new TIntArrayList ();
5353
54- robotIndex .init (null );
54+ // robotIndex.init(null);
5555
5656 robotTypeCount .put (Team .A , new EnumMap <>(
5757 UnitType .class ));
@@ -131,19 +131,19 @@ public InternalRobot getRobotByID(int id) {
131131 return gameRobotsByID .get (id );
132132 }
133133
134- public void moveRobot (InternalRobot robot , MapLocation newLocation ) {
135- MapLocation loc = robot .getLocation ();
134+ // public void moveRobot(InternalRobot robot, MapLocation newLocation) {
135+ // // MapLocation loc = robot.getLocation();
136136
137- robotIndex .delete (fromPoint (loc ),robot .getID ());
138- robotIndex .add (fromPoint (newLocation ),robot .getID ());
139- }
137+ // // robotIndex.delete(fromPoint(loc),robot.getID());
138+ // // robotIndex.add(fromPoint(newLocation),robot.getID());
139+ // }
140140
141141 public void clearRobotIndex (InternalRobot robot ) {
142- robotIndex .delete (fromPoint (robot .getLocation ()), robot .getID ());
142+ // robotIndex.delete(fromPoint(robot.getLocation()), robot.getID());
143143 }
144144
145145 public void addRobotIndex (InternalRobot robot , MapLocation newLocation ) {
146- robotIndex .add (fromPoint (newLocation ),robot .getID ());
146+ // robotIndex.add(fromPoint(newLocation),robot.getID());
147147 }
148148
149149 // ****************************
@@ -159,8 +159,8 @@ public void createRobot(InternalRobot robot) {
159159
160160 dynamicBodyExecOrder .add (id );
161161
162- MapLocation loc = robot .getLocation ();
163- robotIndex .add (fromPoint (loc ),robot .getID ());
162+ // MapLocation loc = robot.getLocation();
163+ // robotIndex.add(fromPoint(loc),robot.getID());
164164 }
165165
166166 // ****************************
@@ -192,25 +192,25 @@ public void destroyRobot(int id) {
192192 }
193193
194194 if (loc != null ) {
195- robotIndex .delete (fromPoint (loc ),id );
195+ // robotIndex.delete(fromPoint(loc),id);
196196 }
197197 }
198198
199199 // ****************************
200200 // *** PLAYER METHODS *********
201201 // ****************************
202202
203- private Rectangle fromPoint (float x , float y ) {
204- return new Rectangle (x ,y ,x ,y );
205- }
203+ // private Rectangle fromPoint(float x, float y) {
204+ // return new Rectangle(x,y,x,y);
205+ // }
206206
207- private Rectangle fromPoint (Point p ) {
208- return new Rectangle (p .x ,p .y ,p .x ,p .y );
209- }
207+ // private Rectangle fromPoint(Point p) {
208+ // return new Rectangle(p.x,p.y,p.x,p.y);
209+ // }
210210
211- private Rectangle fromPoint (MapLocation loc ) {
212- return new Rectangle (loc .x ,loc .y ,loc .x ,loc .y );
213- }
211+ // private Rectangle fromPoint(MapLocation loc) {
212+ // return new Rectangle(loc.x,loc.y,loc.x,loc.y);
213+ // }
214214
215215 // ****************************
216216 // *** PRIVATE METHODS ********
0 commit comments