示例#1
0
 public int predictShips(Planet planet, int turns) {
   if (NeutralPlanets().contains(planet)) {
     return planet.NumShips();
   } else {
     return planet.NumShips() + planet.GrowthRate() * turns;
   }
 }
示例#2
0
 // Returns the production of the given player.
 public int Production(int playerID) {
   int prod = 0;
   for (Planet p : planets) {
     if (p.Owner() == playerID) {
       prod += p.GrowthRate();
     }
   }
   return prod;
 }
示例#3
0
 public float value_myself() {
   // int myships = this.NumShips(1);
   // int myplanets = this.NumPlanets();
   int mygrowth = 0;
   float value;
   for (Planet planet : MyPlanets()) {
     mygrowth += planet.GrowthRate();
   }
   value = (float) mygrowth;
   return value;
 }