@@ -0,0 +1,1661 @@
+%22%22%22%0AUtil.py%0AAn utilitary module%0A%22%22%22%0A%0Adef rect(canvas, pt_a, pt_b, pt_border, pt_border_clr, pt_bg_clr):%0A    %22%22%22%0A    Draw a rectangle%0A    %22%22%22%0A    canvas.draw_polygon(%5Bpt_a, (pt_b%5B0%5D, pt_a%5B1%5D), pt_b, (pt_a%5B0%5D, pt_b%5B1%5D)%5D,%5C%0A    pt_border, pt_border_clr)%0A    for i in range(pt_a%5B0%5D+1, pt_b%5B0%5D-1):%0A        canvas.draw_line((i, pt_a%5B1%5D), (i, pt_b%5B1%5D), 2, pt_bg_clr)%0A%0Aclass Ball:%0A    %22%22%22%0A    Ball class%0A    %22%22%22%0A    def __init__(self, pos, vel, radius, border, color, color2):%0A        self.pos = pos%0A        self.vel = vel%0A        self.radius = radius%0A        self.border = 1%0A        self.color = color%0A        self.borderColor = color2%0A        self.lives = 10%0A%0A    def update(self):%0A        %22%22%22%0A        Updates the ball's position%0A        %22%22%22%0A        self.pos.add(self.vel)%0A%0A    def offsetL(self):%0A        %22%22%22%0A        Left offset%0A        %22%22%22%0A        return self.pos.x - self.radius%0A%0A    def offsetR(self):%0A        %22%22%22%0A        Right offset%0A        %22%22%22%0A        return self.pos.x + self.radius%0A%0A    def offsetU(self):%0A        %22%22%22%0A        Top offset%0A        %22%22%22%0A        return self.pos.y - self.radius%0A%0A    def offsetD(self):%0A        %22%22%22%0A        Bottom offset%0A        %22%22%22%0A        return self.pos.y + self.radius%0A%0A    def draw(self, canvas):%0A        %22%22%22%0A        Draw the ball%0A        %22%22%22%0A        canvas.draw_circle(self.pos.getP(), self.radius, self.border, self.borderColor, self.color)%0A%0A    def bounce(self, normal):%0A        %22%22%22%0A        Make the ball bounce%0A        %22%22%22%0A        self.vel.reflect(normal)%0A%0A    def hit(self, ball):%0A        %22%22%22%0A        Ball/ball collision detection%0A        %22%22%22%0A        return self.pos.copy().sub(ball.pos).length() %3C= self.radius+ball.radius%0A

Create Util.py