dcs_liberation/theater/missiontarget.py
Dan Albert 4145d5578e Refactor game and ground object generation.
No real functional improvements yet, just reorganizing to make
improvements easier.
2020-11-05 16:09:34 -08:00

20 lines
568 B
Python

from __future__ import annotations
from dcs.mapping import Point
class MissionTarget:
def __init__(self, name: str, position: Point) -> None:
"""Initializes a mission target.
Args:
name: The name of the mission target.
position: The location of the mission target.
"""
self.name = name
self.position = position
def distance_to(self, other: MissionTarget) -> int:
"""Computes the distance to the given mission target."""
return self.position.distance_to_point(other.position)