combinedtiles[aboveindexcombinedtiles[aboveindex combinedtiles[ blank topmost space is always blank return combinedtiles def makemove(boardmove) """carries out the move on the board the move argument is either ' '' '' 'or 'dand the function returns the resulting board data structure "" the board is split up into four columnswhich are different depending on the direction of the move if move =' ' allcolumnsspaces [[( )( )( )( )] [( )( )( )( )] [( )( )( )( )] [( )( )( )( )] elif move =' ' allcolumnsspaces [[( )( )( )( )] [( )( )( )( )] [( )( )( )( )] [( )( )( )( )] elif move =' ' allcolumnsspaces [[( )( )( )( )] [( )( )( )( )] [( )( )( )( )] [( )( )( )( )] elif move =' ' allcolumnsspaces [[( )( )( )( )] [( )( )( )( )] [( )( )( )( )] [( )( )( )( )] the board data structure after making the move boardaftermove { for columnspaces in allcolumnsspacesloop over all columns get the tiles of this column (the first tile is the "bottom of the column) firsttilespace columnspaces[ secondtilespace columnspaces[ thirdtilespace columnspaces[ fourthtilespace columnspaces[ firsttile board[firsttilespace secondtile board[secondtilespace thirdtile board[thirdtilespace fourthtile board[fourthtilespace form the column and combine the tiles in it column [firsttilesecondtilethirdtilefourthtile combinedtilescolumn combinetilesincolumn(column set up the new board data structure with the combined tiles boardaftermove[firsttilespacecombinedtilescolumn[ project #