displaysurf blit(hintssurfhintsrectmainclock tick(fpspygame display update(make the move and end the turn makemove(mainboardplayertilemovexy[ ]movexy[ ]trueif getvalidmoves(mainboardcomputertile![]only set for the computer' turn if it can make move turn 'computerelsecomputer' turnif getvalidmoves(mainboardcomputertile=[]if it was set to be the computer' turn but they can' movethen end the game break draw the board drawboard(mainboarddrawinfo(mainboardplayertilecomputertileturndraw the "new gameand "hintsbuttons displaysurf blit(newgamesurfnewgamerectdisplaysurf blit(hintssurfhintsrectmake it look like the computer is thinking by pausing bit pauseuntil time time(random randint( while time time(pauseuntilpygame display update(make the move and end the turn xy getcomputermove(mainboardcomputertilemakemove(mainboardcomputertilexytrueif getvalidmoves(mainboardplayertile![]only set for the player' turn if they can make move turn 'playerdisplay the final score drawboard(mainboardscores getscoreofboard(mainboarddetermine the text of the message to display if scores[playertilescores[computertile]text 'you beat the computer by % pointscongratulations!(scores[playertilescores[computertile]email questions to the authoral@inventwithpython com