the line was being removed and the rows being pulled down that the variable changed at all so on the next iterationthe variable is pointing to the same row as before this is needed because if there were two complete linesthen the second complete line would have been pulled down and would also have to be removed the code will then remove this complete lineand then go to the next iteration it is only when there is not completed line that the variable is decremented on line once the variable has been decremented all the way to the execution will exit the while loop convert from board coordinates to pixel coordinates def converttopixelcoords(boxxboxy) convert the given xy coordinates of the board to xy coordinates of the location on the screen return (xmargin (boxx boxsize))(topmargin (boxy boxsize)this helper function converts the board' box coordinates to pixel coordinates this function works the same way to the other --convert coordinates|functions used in the previous game programs drawing box on the board or elsewhere on the screen def drawbox(boxxboxycolorpixelx=nonepixely=none) draw single box (each tetromino piece has four boxes at xy coordinates on the board orif pixelx pixely are specifieddraw to the pixel coordinates stored in pixelx pixely (this is used for the "nextpiece if color =blank return if pixelx =none and pixely =none pixelxpixely converttopixelcoords(boxxboxy pygame draw rect(displaysurfcolors[color](pixelx pixely boxsize boxsize ) pygame draw rect(displaysurflightcolors[color](pixelx pixely boxsize boxsize )the drawbox(function draws single box on the screen the function can receive boxx and boxy parameters for board coordinates where the box should be drawn howeverif the pixelx and pixely parameters are specifiedthen these pixel coordinates will override the boxx and boxy parameters the pixelx and pixely parameters are used to draw the boxes of the --next|piecewhich is not on the board if the pixelx and pixely parameters are not setthen they will be set to none by default when the function first begins then the if statement on line will overwrite the none values