def draw_town_map(town_map):
    col_map = {0: WHITE, 1: BLACK, 2: LIGHT_GREEN, (- 6): LIGHT_RED, (- 1): LIGHT_RED}
    (rows, cols) = town_map.shape
    colored_town_map = [[col_map[town_map[(j, i)]] for i in range(cols)] for j in range(rows)]
    fig = plt.figure(1, figsize=(cols, rows))
    ax = plt.gca()
    ax.set_title('The town_map')
    ax.set_xticks([])
    ax.set_yticks([])
    (rows, cols) = town_map.shape
    colored_town_map = [[col_map[town_map[(j, i)]] for i in range(cols)] for j in range(rows)]
    fig = plt.figure(1, figsize=(cols, rows))
    grid = plt.table(cellText=None, cellColours=colored_town_map, cellLoc='center', loc=(0, 0), edges='closed')
    tc = grid.properties()['children']
    for cell in tc:
        cell.set_height((1.0 / rows))
        cell.set_width((1.0 / cols))
def draw_town_map(town_map):
    col_map = {0: WHITE, 1: BLACK, 2: LIGHT_GREEN, (- 6): LIGHT_RED, (- 1): LIGHT_RED}
    (rows, cols) = town_map.shape
    colored_town_map = [[col_map[town_map[(j, i)]] for i in range(cols)] for j in range(rows)]
    fig = plt.figure(1, figsize=(cols, rows))
    ax = plt.gca()
    ax.set_title('The town_map')
    ax.set_xticks([])
    ax.set_yticks([])
    (rows, cols) = town_map.shape
    colored_town_map = [[col_map[town_map[(j, i)]] for i in range(cols)] for j in range(rows)]
    fig = plt.figure(1, figsize=(cols, rows))
    grid = plt.table(cellText=None, cellColours=colored_town_map, cellLoc='center', loc=(0, 0), edges='closed')
    tc = grid.properties()['children']
    for cell in tc:
        cell.set_height((1.0 / rows))
        cell.set_width((1.0 / cols))