game: collision work
This commit is contained in:
@ -10,7 +10,7 @@ class Ball:
|
||||
def __init__(self) -> None:
|
||||
self.size: float = config.BALL_SIZE
|
||||
self.position: Point = Point(config.BALL_SPAWN_POS_X + self.size / 2, config.BALL_SPAWN_POS_Y + self.size / 2)
|
||||
self.angle: float = math.pi * 0
|
||||
self.angle: float = math.pi * 0.25
|
||||
self.speed: float = config.BALL_SPEED_START
|
||||
|
||||
def to_dict(self):
|
||||
|
@ -15,6 +15,9 @@ class Segment:
|
||||
def __str__(self) -> str:
|
||||
return f"Segment(start: {self.start}, stop: {self.stop})"
|
||||
|
||||
def copy(self):
|
||||
return Segment(self.start.copy(), self.stop.copy())
|
||||
|
||||
def to_dict(self):
|
||||
|
||||
data: dict[str: dict] = {
|
||||
|
Reference in New Issue
Block a user