# Path: cwmud/contrib/worldgen/terrain.py
# TERRAIN = TerrainManager()


import sys
from PIL import Image
from cwmud.libs.miniboa import colorize
from cwmud.contrib.worldgen.maps import render_map
from cwmud.contrib.worldgen.terrain import TERRAIN
    :param int height: The height of the image to create
    :param tuple(int, int) center: The (x, y) coordinate to the
                                   center the map on
    :param float scale: How big the pixels are
    :param map_data: Optional, map data to visualize instead of the default
    :param dict color_table: Optional, a mapping of symbols to colors to use
                             instead of the default
    :returns None:

    """
    if not map_data:
        map_data = render_map(
            width, height, center, join_tiles=False, show_center=False)
    if not color_table:
        color_table = COLOR_TABLE
    pixels = []
    for row in map_data:
        for tile in row:
            pixels.append(color_table[tile])
    image = Image.new("RGB", (width, height))
    image.putdata(pixels, scale=scale)
    image.save(path)


def print_symbols():
    for symbol in "A^wmnu~t%&*\"',.":
        for color in "gGyYwWkKcCbB":
            comp_symbol = "^{}{}".format(
                color, "^^" if symbol == "^" else symbol)
            terrain_name = ""

# Path: cwmud/contrib/worldgen/terrain.py
# TERRAIN = TerrainManager()


# Path: scripts/maptools.py
import sys
from PIL import Image
from cwmud.libs.miniboa import colorize
from cwmud.contrib.worldgen.maps import render_map
from cwmud.contrib.worldgen.terrain import TERRAIN

    :param int height: The height of the image to create
    :param tuple(int, int) center: The (x, y) coordinate to the
                                   center the map on
    :param float scale: How big the pixels are
    :param map_data: Optional, map data to visualize instead of the default
    :param dict color_table: Optional, a mapping of symbols to colors to use
                             instead of the default
    :returns None:

    """
    if not map_data:
        map_data = render_map(
            width, height, center, join_tiles=False, show_center=False)
    if not color_table:
        color_table = COLOR_TABLE
    pixels = []
    for row in map_data:
        for tile in row:
            pixels.append(color_table[tile])
    image = Image.new("RGB", (width, height))
    image.putdata(pixels, scale=scale)
    image.save(path)


def print_symbols():
    for symbol in "A^wmnu~t%&*\"',.":
        for color in "gGyYwWkKcCbB":
            comp_symbol = "^{}{}".format(
                color, "^^" if symbol == "^" else symbol)
            terrain_name = ""

            for terrain in TERRAIN._terrains.values():