Refactor front line code to make sides explicit.

A was intended to be the blue point and B was intended to be the red
point. Make this a part of the name so that's clear, and clean up
related code to keep that reliable.
This commit is contained in:
Dan Albert
2021-05-07 20:56:39 -07:00
parent 12f474ecbe
commit b0c24f6e51
13 changed files with 125 additions and 154 deletions

View File

@@ -98,13 +98,13 @@ class VisualGenerator:
def _generate_frontline_smokes(self):
for front_line in self.game.theater.conflicts():
from_cp = front_line.control_point_a
to_cp = front_line.control_point_b
from_cp = front_line.blue_cp
to_cp = front_line.red_cp
if from_cp.is_global or to_cp.is_global:
continue
plane_start, heading, distance = Conflict.frontline_vector(
from_cp, to_cp, self.game.theater
front_line, self.game.theater
)
if not plane_start:
continue