(xytuples of integer indexes for board positionsthe values are wallempty_spaceor dead_robot the dictionary also has the key 'teleportsfor the number of teleports the player has left the living robots are stored separately from the board dictionary "" board {'teleports'num_teleports create an empty board for in range(width) for in range(height) board[(xy)empty_space add walls on the edges of the board for in range(width) board[( )wall make top wall board[(xheight )wall make bottom wall for in range(height) board[( )wall make left wall board[(width )wall make right wall add the random walls for in range(num_walls) xy getrandomemptyspace(board[] board[(xy)wall add the starting dead robots for in range(num_dead_robots) xy getrandomemptyspace(board[] board[(xy)dead_robot return board def getrandomemptyspace(boardrobots) """return (xyinteger tuple of an empty space on the board "" while true randomx random randint( width randomy random randint( height if isempty(randomxrandomyboardrobots) break return (randomxrandomy def isempty(xyboardrobots) """return true if the (xyis empty on the board and there' also no robot there "" return board[(xy)=empty_space and (xynot in robots def addrobots(board) """add num_robots number of robots to empty spaces on the board and return list of these (xyspaces where robots are now located "" robots [ for in range(num_robots) xy getrandomemptyspace(boardrobots robots append((xy) return robots project #