return true return true the first time you find pattern return false def drawmovinggem(gemprogress) draw gem sliding in the direction that its 'directionkey indicates the progress parameter is number from (just startingto (slide complete movex movey progress * if gem['direction'=up movey -int(progress gemimagesize elif gem['direction'=down movey int(progress gemimagesize elif gem['direction'=right movex int(progress gemimagesize elif gem['direction'=left movex -int(progress gemimagesize basex gem[' ' basey gem[' ' if basey =rowaboveboard basey - pixelx xmargin (basex gemimagesize pixely ymargin (basey gemimagesize pygame rect(pixelx movexpixely moveygemimagesizegemimagesize displaysurf blit(gemimages[gem['imagenum']] def pulldownallgems(board) pulls down gems on the board to the bottom to fill in any gaps for in range(boardwidth) gemsincolumn [ for in range(boardheight) if board[ ][ !empty_space gemsincolumn append(board[ ][ ] board[ ([empty_space(boardheight len(gemsincolumn))gemsincolumn def getgemat(boardxy)