enter wasd (or quit)( ( ( --snip-how it works the data structure that represents the sliding tile game board is list of lists the inner lists each represent one column of the board and contain strings for the numbered tiles (or the blank string to represent the blank spacethe getnewboard(function returns this list of lists with all tiles in their starting positions and the blank space in the lower-right corner python can swap the values in two variables with statement like ab ba the program uses this technique on lines to to swap the blank space and neighboring tile and simulate sliding numbered tile into the blank space the getnewpuzzle(function generates new puzzles by performing of these swaps randomly """sliding tile puzzleby al sweigart al@inventwithpython com slide the numbered tiles into the correct order view this code at tagslargegamepuzzle"" import randomsys blank notethis string is two spacesnot one def main() print('''sliding tile puzzleby al sweigart al@inventwithpython com use the wasd keys to move the tiles back into their original order ''' input('press enter to begin ' gameboard getnewpuzzle( while true displayboard(gameboard playermove askforplayermove(gameboard makemove(gameboardplayermove if gameboard =getnewboard() print('you won!' sys exit( def getnewboard() """return list of lists that represents new tile puzzle ""sliding tile puzzle