''' car.py Jeff Ondich & friends 26 October 2018 ''' import random from graphics import * class Car: def __init__(self, left, top, width, height, color): # Of what does one Car instance consist? # A rectangle... upper_left = Point(left, top) bottom_right = Point(left + width, top + height) self.body = Rectangle(upper_left, bottom_right) self.body.setFill(color) # ...and two circles... radius = height // 4 self.left_tire = Circle(Point(left + radius + 5, top + height), radius) self.left_tire.setFill(color_rgb(0, 0, 0)) self.right_tire = Circle(Point(left + width - radius - 5, top + height), radius) self.right_tire.setFill(color_rgb(0, 0, 0)) # Velocity #self.velocity = ??? def draw(self, window): self.body.draw(window) self.left_tire.draw(window) self.right_tire.draw(window) def step(self): # move the car one increment pass