game: add: class: point and segment, add: type docstring

This commit is contained in:
2024-01-21 00:33:30 +01:00
parent 6f8768e149
commit 8da7e09af7
19 changed files with 478 additions and 125 deletions

View File

@ -7,10 +7,12 @@ class Ball:
self.postion_y: float = config.BALL_SPAWN_POS_Y
self.velocity_x: float = config.BALL_SPEED_START
self.velocity_y: float = config.BALL_SPEED_START
self.size: float = config.BALL_SIZE
def to_dict(self):
data: dict = {
"size": self.size,
"position_x": self.postion_x,
"position_y": self.postion_y,
"velocity_x": self.velocity_x,