# Path: console.py
# class ConsoleVisual(object):
#     def __init__(self, width, height):
#     def get_color_fg(self, position):
#     def get_color_bg(self, position):
#     def get_symbol(self, position):
#     def get_default_color_fg(self):
#     def get_default_color_bg(self):
#     def set_default_color_fg(self, color, console=0):
#     def set_default_color_bg(self, color, console=0):
#     def set_symbol(self, position, icon, console=0):
#     def set_color_fg(self, position, color, console=0):
#     def set_color_bg(self, position, color, effect=libtcod.BKGND_SET, console=0):
#     def print_text(self, position, text):
#     def print_text_vertical(self, position, text):
#     def set_colors_and_symbol(self, position, color_fg, color_bg, icon, console=0):
#     def print_char_big(self, icon_position, destination, console=0):
#     def flush(self):
#     def print_screen(self):


import geometry as geo
import gui
import icon
import libtcodpy as libtcod
import colors
import inputhandler
import settings
import state
from console import console
        if key == inputhandler.TAB:
            seen_entities = self._get_seen_entities_within_max_distance()
            if len(seen_entities) < 1:
                return
            entities_on_cursor =\
                self.entity.dungeon_level.value.get_tile_or_unknown(self.cursor_position).get_entities()
            current_entity = next((entity for entity in entities_on_cursor if not entity.has("is_player")), None)
            if current_entity is None:
                self.cursor_position = seen_entities[0].position.value
            else:
                current_index = seen_entities.index(current_entity)
                next_index = (current_index + 1) % len(seen_entities)
                self.cursor_position = seen_entities[next_index].position.value

    def _get_seen_entities_within_max_distance(self):
        return [entity for entity in
                self.entity.vision.get_seen_entities_closest_first()
                if geo.chess_distance(entity.position.value,
                                      self.entity.position.value)
                <= self.max_distance]

    def _draw_path_point(self, point):
        screen_position = self.camera.dungeon_to_screen_position(point)
        terrain = self.entity.dungeon_level.value.\
            get_tile_or_unknown(point).get_terrain()
        if(self.entity.dungeon_mask.can_see_point(point) and
           terrain.has("is_solid")):
            console.set_symbol(screen_position, icon.DIAGONAL_STRIPES)
            console.set_color_bg(screen_position, colors.BLOCKED_PATH)
        else:

# Path: console.py
# class ConsoleVisual(object):
#     def __init__(self, width, height):
#     def get_color_fg(self, position):
#     def get_color_bg(self, position):
#     def get_symbol(self, position):
#     def get_default_color_fg(self):
#     def get_default_color_bg(self):
#     def set_default_color_fg(self, color, console=0):
#     def set_default_color_bg(self, color, console=0):
#     def set_symbol(self, position, icon, console=0):
#     def set_color_fg(self, position, color, console=0):
#     def set_color_bg(self, position, color, effect=libtcod.BKGND_SET, console=0):
#     def print_text(self, position, text):
#     def print_text_vertical(self, position, text):
#     def set_colors_and_symbol(self, position, color_fg, color_bg, icon, console=0):
#     def print_char_big(self, icon_position, destination, console=0):
#     def flush(self):
#     def print_screen(self):


# Path: positionexaminer.py
import geometry as geo
import gui
import icon
import libtcodpy as libtcod
import colors
import inputhandler
import settings
import state
from console import console

        if key == inputhandler.TAB:
            seen_entities = self._get_seen_entities_within_max_distance()
            if len(seen_entities) < 1:
                return
            entities_on_cursor =\
                self.entity.dungeon_level.value.get_tile_or_unknown(self.cursor_position).get_entities()
            current_entity = next((entity for entity in entities_on_cursor if not entity.has("is_player")), None)
            if current_entity is None:
                self.cursor_position = seen_entities[0].position.value
            else:
                current_index = seen_entities.index(current_entity)
                next_index = (current_index + 1) % len(seen_entities)
                self.cursor_position = seen_entities[next_index].position.value

    def _get_seen_entities_within_max_distance(self):
        return [entity for entity in
                self.entity.vision.get_seen_entities_closest_first()
                if geo.chess_distance(entity.position.value,
                                      self.entity.position.value)
                <= self.max_distance]

    def _draw_path_point(self, point):
        screen_position = self.camera.dungeon_to_screen_position(point)
        terrain = self.entity.dungeon_level.value.\
            get_tile_or_unknown(point).get_terrain()
        if(self.entity.dungeon_mask.can_see_point(point) and
           terrain.has("is_solid")):
            console.set_symbol(screen_position, icon.DIAGONAL_STRIPES)
            console.set_color_bg(screen_position, colors.BLOCKED_PATH)
        else:

            console.set_symbol(screen_position, icon.DIAGONAL_STRIPES)