# Path: base/scene.py
# class BaseScene(object):
#     """Abstract class for all scenes"""
#     __metaclass__ = abc.ABCMeta
# 
#     def __init__(self, console_manager, scene_manager, game_context):
#         self.console_manager = console_manager
#         self.main_console = console_manager.main_console
#         self.scene_manager = scene_manager
#         self.game_context = game_context
# 
#     @abc.abstractmethod
#     def render(self):
#         pass
# 
#     @abc.abstractmethod
#     def handle_input(self):
#         pass
# 
#     def transition_to(self, scene_name):
#         self.scene_manager.transition_to(scene_name)
# 
# Path: managers/console_manager.py
# class Menu(Console):
#     """
#     Create console for displaying choices to the player
#     """
#     MENU_TEMPLATE = """
#         {menu_name}
#         {menu_text}
#         {options}
#     """
# 
#     OPTION_TEMPLATE = "({option_char:}) {option_description}"
# 
#     def __init__(self, name, text, options, width, height):
#         Console.__init__(self, width, height)
#         self.name = name
#         self.text = text
#         self.options = options
#         self.max_options_len = 26
#         self.letter_index = ord('a')
# 
#     def create_menu(self, pos_x, pos_y):
#         self.move(pos_x, pos_y)
#         self.printStr(self.MENU_TEMPLATE.format(
#             menu_name=self.name,
#             menu_text=self.text,
#             options=self._build_options()
#         ))
# 
#     def _build_options(self):
#         option_msg = []
#         for option_text in self.options:
#             option = self.OPTION_TEMPLATE.format(
#                 option_char=chr(self.letter_index),
#                 option_description=option_text
#             )
#             option_msg.append(option)
#             self.letter_index += 1
#         return "\n".join(option_msg)
# 
#     def print_str(self, text, pos_x, pos_y):
#         self.move(pos_x, pos_y)
#         self.printStr(text)
# 
# Path: ui/flavor_text.py
# MAIN_MENU = {
#     "name": "Main Menu",
#     "text": """
#         Welcome to Python Roguelike Framework!
#         
#         This '@' is you. Your goal is to explore the dungeon. Use caution though as there are
#         monsters lurking around every corner waiting to jump out and attack you!
#     """,
#     "options": ["Play", "Quit"]
# }


import tdl
from base.scene import BaseScene
from managers.console_manager import Menu
from ui.flavor_text import MAIN_MENU



class MainMenuScene(BaseScene):
    ID = "MainMenu"

    def __init__(self, console_manager, scene_manager, game_context):
        super().__init__(console_manager, scene_manager, game_context)
        self.menu = Menu(MAIN_MENU['name'],

# Path: base/scene.py
# class BaseScene(object):
#     """Abstract class for all scenes"""
#     __metaclass__ = abc.ABCMeta
# 
#     def __init__(self, console_manager, scene_manager, game_context):
#         self.console_manager = console_manager
#         self.main_console = console_manager.main_console
#         self.scene_manager = scene_manager
#         self.game_context = game_context
# 
#     @abc.abstractmethod
#     def render(self):
#         pass
# 
#     @abc.abstractmethod
#     def handle_input(self):
#         pass
# 
#     def transition_to(self, scene_name):
#         self.scene_manager.transition_to(scene_name)
# 
# Path: managers/console_manager.py
# class Menu(Console):
#     """
#     Create console for displaying choices to the player
#     """
#     MENU_TEMPLATE = """
#         {menu_name}
#         {menu_text}
#         {options}
#     """
# 
#     OPTION_TEMPLATE = "({option_char:}) {option_description}"
# 
#     def __init__(self, name, text, options, width, height):
#         Console.__init__(self, width, height)
#         self.name = name
#         self.text = text
#         self.options = options
#         self.max_options_len = 26
#         self.letter_index = ord('a')
# 
#     def create_menu(self, pos_x, pos_y):
#         self.move(pos_x, pos_y)
#         self.printStr(self.MENU_TEMPLATE.format(
#             menu_name=self.name,
#             menu_text=self.text,
#             options=self._build_options()
#         ))
# 
#     def _build_options(self):
#         option_msg = []
#         for option_text in self.options:
#             option = self.OPTION_TEMPLATE.format(
#                 option_char=chr(self.letter_index),
#                 option_description=option_text
#             )
#             option_msg.append(option)
#             self.letter_index += 1
#         return "\n".join(option_msg)
# 
#     def print_str(self, text, pos_x, pos_y):
#         self.move(pos_x, pos_y)
#         self.printStr(text)
# 
# Path: ui/flavor_text.py
# MAIN_MENU = {
#     "name": "Main Menu",
#     "text": """
#         Welcome to Python Roguelike Framework!
#         
#         This '@' is you. Your goal is to explore the dungeon. Use caution though as there are
#         monsters lurking around every corner waiting to jump out and attack you!
#     """,
#     "options": ["Play", "Quit"]
# }


# Path: scenes/main_menu.py
import tdl
from base.scene import BaseScene
from managers.console_manager import Menu
from ui.flavor_text import MAIN_MENU




class MainMenuScene(BaseScene):
    ID = "MainMenu"

    def __init__(self, console_manager, scene_manager, game_context):
        super().__init__(console_manager, scene_manager, game_context)
        self.menu = Menu(MAIN_MENU['name'],

                         MAIN_MENU['text'],