from typing import Tuple import numpy as np #datatypes graphics_dt = np.dtype( [ ("ch", np.int32), ("fg", "3B"), ("bg", "3B"), ] ) tile_dt = np.dtype( [ ("walkable", np.bool), ("transparent", np.bool), ("light", graphics_dt), #when this tile is in FOV ("dark", graphics_dt), #when this tile is *not* in FOV ] ) def new_tile(*, walkable: np.bool, transparent: np.bool, light: graphics_dt, dark: graphics_dt): return np.array((walkable, transparent, light, dark), dtype = tile_dt) #list of tile types wall = new_tile( walkable=False, transparent=False, light=(ord('#'), (200, 200, 200), (0, 0, 0)), dark =(ord('#'), (100, 100, 100), (0, 0, 0)), ) floor = new_tile( walkable=True, transparent=True, light=(ord('.'), (200, 200, 200), (0, 0, 0)), dark =(ord('.'), (100, 100, 100), (0, 0, 0)), )