Question: import random from typing import Tuple, Optional def make_grid(w: int, h: int, player_coord: Tuple[int, int], gold_coord: Tuple[int, int]) -> List[List[str]]: Given two integers width w

import random from typing import Tuple, Optional def make_grid(w: int, h: int, player_coord: Tuple[int, int], gold_coord: Tuple[int, int]) -> List[List[str]]: Given two integers width w and height h, create a list of lists to represent a grid of the given width and height. The coordinates for the player and the gold is also given as two two-element tuples. For each tuple, the first element has the x-coordinate and the second element has the y-coordinate. The player and the gold should be included in the grid in the positions specified by these tuples. The player is represented with the string '(x)' The gold is represented with the string '(o)' All other spaces are represented with the string '(_)' Return this list. >>> make_grid(2, 3, (0, 0), (1, 2)) [['(x)', '()'], ['()','()'], ['(_)', '(0)']] pass
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
