42_ft_transcendence/games/objects/Segment.py

17 lines
369 B
Python

from .Point import Point
class Segment:
def __init__(self, start: Point, stop: Point) -> None:
self.start: Point = start
self.stop: Point = stop
def to_dict(self):
data: dict[str: dict] = {
"start": self.start.to_dict(),
"stop": self.stop.to_dict(),
}
return data