From f43c2881212c4f110cfebf127dd8773c5dfa7587 Mon Sep 17 00:00:00 2001 From: Amy Shackles Date: Sun, 22 Jul 2018 18:55:26 -0700 Subject: [PATCH] Specify TODO is for staff and not for students TODO items can be confusing to students attempting to read the file who may think that the note is directed toward them. --- src/ball.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ball.py b/src/ball.py index 20e2792..a01ed55 100644 --- a/src/ball.py +++ b/src/ball.py @@ -58,7 +58,7 @@ def __init__(self, mass, object_list, bounds, position, velocity, color, radius) def collide_with_ball(self, object, relative_vector): - #TODO: Calculate the correct position and move there directly + #TODO item for Lambda staff: Calculate the correct position and move there directly while relative_vector.length() <= self.radius + object.radius: self.position += relative_vector.normalize() object.position -= relative_vector.normalize() @@ -81,7 +81,7 @@ def collide_with_rectangle(self, object): # rectangles overlap. left, right, top, bottom = False, False, False, False - # TODO: This can probably be optimized + # TODO item for Lambda staff: This can probably be optimized if ( object.position.x > self.position.x and object.position.x - object.rectangle.width/2 <= self.position.x + self.radius and @@ -119,7 +119,7 @@ def collide_with_rectangle(self, object): if test == 1: object.touched_by_ball = True # the ball has collided with an edge - # TODO: # fix sticky edges + # TODO item for Lambda staff: # fix sticky edges if left or right: self.velocity.x *= -1 if left: @@ -135,7 +135,7 @@ def collide_with_rectangle(self, object): self.position.y = object.position.y + object.rectangle.height/2 + self.radius + 1 elif test == 4: - # TODO: Better error handling + # TODO item for Lambda staff: Better error handling print('error: ball inside rectangle') elif test == 0: @@ -161,7 +161,7 @@ def check_collision(self): # Warning!: This is a primitive method of collision detection # Consider time complexity when adding more of this type index = self.object_list.index(self) - for object in self.object_list[index+1:]: # TODO: Check effeciency + for object in self.object_list[index+1:]: # TODO item for Lambda staff: Check effeciency # Balls colliding with blocks if issubclass(type(object), KineticBlock) and object != self: # Do a first round pass for collision (we know object is a KineticBlock)