Commits

INADA Naoki committed dcb6ddb

すでに squad を送っている相手に重複で別 squad を送れるように.

  • Participants
  • Parent commits df23432

Comments (0)

Files changed (1)

src/net/javachallenge/players/Methane1Player.java

 
             targetloop: for (Vein enemyVein : nearEnemies) {
                 TrianglePoint loc = enemyVein.getLocation();
+                int enemyRobots = enemyVein.getNumberOfRobots();
                 if (targetted.contains(loc)) {
                     continue;
                 }
                             continue targetloop;
                         }
                         if (s.getOwnerId() == self.getId()) {
-                            continue targetloop;
+                            enemyRobots -= s.getRobot();
+                            if (enemyRobots < 0) enemyRobots = 0;
                         }
                         targetSquads.add(s);
                     }
                 }
 
                 Collections.sort(targetSquads, new NearDestination());
-                int enemyRobots = enemyVein.getNumberOfRobots();
                 int enemyId = enemyVein.getOwnerId();
                 int t = 0;
                 for (Squad s : targetSquads) {