break tilestoflip append([xy] board[xstart][ystartrestore the empty space if len(tilestoflip= if no tiles were flippedthis is not valid move return false return tilestoflip def isonboard(xy) returns true if the coordinates are located on the board return > and and <= def getboardwithvalidmoves(boardtile) returns new board with marking the valid moves the given player can make dupeboard getboardcopy(board for xy in getvalidmoves(dupeboardtile) dupeboard[ ][ return dupeboard def getvalidmoves(boardtile) returns list of [ ,ylists of valid moves for the given player on the given board validmoves [ for in range( ) for in range( ) if isvalidmove(boardtilexy!false validmoves append([xy] return validmoves def getscoreofboard(board) determine the score by counting the tiles returns dictionary with keys 'xand ' xscore oscore for in range( ) for in range( ) if board[ ][ =' ' xscore + if board[ ][ =' 'post questions to