Files
boot-dev-maze-solver/Line.py
2025-02-22 22:49:26 +02:00

15 lines
358 B
Python

from Point import Point
from tkinter import Canvas
class Line:
def __init__(
self,
p1:Point,
p2:Point,
):
self.p1:Point = p1
self.p2:Point = p2
def draw(self, canvas:Canvas, fill_color:str="black") -> None:
canvas.create_line(self.p1.x, self.p1.y, self.p2.x, self.p2.y, fill=fill_color, width=2)