Exemplo n.º 1
0
  public void newUnit(int senderID, MapLocation location, String robotType) {
    if (RobotType.valueOf(robotType).isBuilding()) {
      if (sensing.knownAlliedTowerLocations == null) sensing.senseAlliedTowerLocations();

      if (!sensing.knownAlliedTowerLocations.containsKey(senderID)) {
        sensing.knownAlliedTowerLocations.put(new Integer(senderID), location);
        sensing.knownAlliedTowerIDs.put(location.getX() + "," + location.getY(), senderID);
      }
    }
  }
 @Override
 public int hashCode() {
   return type.ordinal() + 561 * team.ordinal();
 }
Exemplo n.º 3
0
 public RInfoShort(MapLocation l, int e, String t) {
   location = l;
   energon = (double) e;
   type = RobotType.valueOf(t);
 }