figure - is an example picture of rectangle and several points the points and the corners of the rectangle are labeled with coordinates point is inside the rectangle if the following four things are truethe point' -coordinate is greater than the -coordinate of the rectangle' left side the point' -coordinate is less than the -coordinate of the rectangle' right side the point' -coordinate is greater than the -coordinate of the rectangle' top side the point' -coordinate is less than the -coordinate of the rectangle' bottom side if any of those parts are falsethen the point is outside the rectangle line combines all four of these conditions into the if statement' condition with and operators figure - example of coordinates inside and outside of rectangle the ( )( and ( points are inside the rectangleand all the others are outside elsereturn false this function is called from the dorectsoverlap(function to see if any of the corners in the two pygame rect objects are inside each other these two functions give you the power to do collision detection between two rectangles the pygame time clock object and tick(method much of lines to do the same things that the animation program in the last didinitialize pygameset windowheight and windowwidthand assign the color and direction constants howeverline is new mainclock pygame time clock(post questions to