public int predictShips(Planet planet, int turns) { if (NeutralPlanets().contains(planet)) { return planet.NumShips(); } else { return planet.NumShips() + planet.GrowthRate() * turns; } }
// 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; }
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; }