# 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 in inputhandler.move_controls:
            dx, dy = inputhandler.move_controls[key]
            self.offset_cursor_position((dx * step_size, dy * step_size))
        elif key in inputhandler.vi_move_controls:
            dx, dy = inputhandler.vi_move_controls[key]
            self.offset_cursor_position((dx * step_size, dy * step_size))

    def offset_cursor_position(self, offset):
        old_x, old_y = self.cursor_position[0], self.cursor_position[1]
        new_x = min_max(old_x + offset[0], self.start_position[0] - self.max_distance, self.start_position[0] + self.max_distance)
        new_y = min_max(old_y + offset[1], self.start_position[1] - self.max_distance, self.start_position[1] + self.max_distance)
        self.cursor_position = (new_x, new_y)

    def _handle_escape(self, key):
        if key == inputhandler.ESCAPE:
            self._exit()

    def _handle_enter(self, key):
        if key == inputhandler.ENTER:
            self._exit()

    def _handle_tab(self, key):
        pass

    def _draw_background(self):
        if not self._background_state is None:
            self._background_state.prepare_draw()

    def _draw_cursor(self):
        position = self.camera.dungeon_to_screen_position(self.cursor_position)

# 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 in inputhandler.move_controls:
            dx, dy = inputhandler.move_controls[key]
            self.offset_cursor_position((dx * step_size, dy * step_size))
        elif key in inputhandler.vi_move_controls:
            dx, dy = inputhandler.vi_move_controls[key]
            self.offset_cursor_position((dx * step_size, dy * step_size))

    def offset_cursor_position(self, offset):
        old_x, old_y = self.cursor_position[0], self.cursor_position[1]
        new_x = min_max(old_x + offset[0], self.start_position[0] - self.max_distance, self.start_position[0] + self.max_distance)
        new_y = min_max(old_y + offset[1], self.start_position[1] - self.max_distance, self.start_position[1] + self.max_distance)
        self.cursor_position = (new_x, new_y)

    def _handle_escape(self, key):
        if key == inputhandler.ESCAPE:
            self._exit()

    def _handle_enter(self, key):
        if key == inputhandler.ENTER:
            self._exit()

    def _handle_tab(self, key):
        pass

    def _draw_background(self):
        if not self._background_state is None:
            self._background_state.prepare_draw()

    def _draw_cursor(self):
        position = self.camera.dungeon_to_screen_position(self.cursor_position)

        console.set_symbol(position, self.cursor_symbol)