def displayboard(boardrobotsplayerposition) """display the boardrobotsand player on the screen "" loop over every space on the board for in range(height) for in range(width) draw the appropriate character if board[(xy)=wall print(wallend='' elif board[(xy)=dead_robot print(dead_robotend='' elif (xy=playerposition print(playerend='' elif (xyin robots print(robotend='' else print(empty_spaceend='' print(print newline def askforplayermove(boardrobotsplayerposition) """returns the (xyinteger tuple of the place the player moves nextgiven their current location and the walls of the board "" playerxplayery playerposition find which directions aren' blocked by wall 'qif isempty(playerx playery boardrobotselse 'wif isempty(playerx playery boardrobotselse 'eif isempty(playerx playery boardrobotselse 'dif isempty(playerx playery boardrobotselse 'cif isempty(playerx playery boardrobotselse 'xif isempty(playerx playery boardrobotselse 'zif isempty(playerx playery boardrobotselse 'aif isempty(playerx playery boardrobotselse allmoves ( ' ' while true get player' move print('( )eleports remaining{}format(board["teleports"]) print(({}({}({})format(qwe) print(({}( ({})format(ad) print('enter move or quit({}({}({})format(zxc) move input(''upper( if move ='quit' print('thanks for playing!' sys exit( elif move ='tand board['teleports' teleport the player to random empty space board['teleports'- return getrandomemptyspace(boardrobots elif move !'and move in allmoves return the new player position based on their move return {' '(playerx playery )hungry robots