# circle.py

# modified from code in Object-Oriented Python, by Irv Kalb

# a class representing a Pygame circle with randomly chosen
# color, size and position. inherits from the Shape class

import pygame
from shape import *

class Circle(Shape):
    def __init__(self, window, max_width, max_height):
        super().__init__(window, max_width, max_height)
        self.radius = random.randrange(10, 50)
        self.x_center= self.x + self.radius
        self.y_center = self.y + self.radius
        self.rect = pygame.Rect(self.x, self.y, self.radius * 2, self.radius * 2)

    def draw(self):
        pygame.draw.circle(self.window, self.color, (self.x_center, self.y_center),
                           self.radius, 0)
