Move calculation of aircraft amounts into game.

The planner needs to know how much space is still expected to be
available next turn.
This commit is contained in:
Dan Albert
2020-11-20 18:25:03 -08:00
parent f8b2dbe283
commit c4b8a41742
7 changed files with 44 additions and 48 deletions

View File

@@ -316,7 +316,7 @@ class Game:
if i > 50 or budget_for_aircraft <= 0:
break
target_cp = random.choice(potential_cp_armor)
if target_cp.base.total_planes >= MAX_AIRCRAFT:
if target_cp.base.total_aircraft >= MAX_AIRCRAFT:
continue
unit = random.choice(potential_units)
price = db.PRICES[unit] * 2