with the return values from converttopixelcoords(this call gets the pixel coordinates of the board coordinates specified by boxx and boxy the code won' fill the entire box' space with color to have black outline in between the boxes of piecethe left and top parameters in the pygame draw rect(call have added to them and is added to the width and height parameters in order to draw the highlighted boxfirst the box is drawn with the darker color on line thena slightly smaller box is drawn on top of the darker box on line drawing everything to the screen def drawboard(board) draw the border around the board pygame draw rect(displaysurfbordercolor(xmargin topmargin (boardwidth boxsize (boardheight boxsize ) fill the background of the board pygame draw rect(displaysurfbgcolor(xmargintopmarginboxsize boardwidthboxsize boardheight) draw the individual boxes on the board for in range(boardwidth) for in range(boardheight) drawbox(xyboard[ ][ ]the drawboard(function is responsible for calling the drawing functions for the board' border and all the boxes on the board first the board' border is drawn on displaysurffollowed by the background color of the board then call to drawbox(is made for each space on the board the drawbox(function is smart enough to leave out the box if board[ ][yis set to blank drawing the score and level text def drawstatus(scorelevel) draw the score text scoresurf basicfont render('score%sscoretruetextcolor scorerect scoresurf get_rect( scorerect topleft (windowwidth displaysurf blit(scoresurfscorerect draw the level text levelsurf basicfont render('level%sleveltruetextcolor levelrect levelsurf get_rect( levelrect topleft (windowwidth displaysurf blit(levelsurflevelrectemail questions to the authoral@inventwithpython com