class TitleScene(Scene): def __init__(self): Scene.__init__(self) self._screen = Screen() def initialize(self): self._screen.clear() self._screen.write('*** Rogue Rebuild ***') self._screen.move((0, 0)) def update(self): key = self._screen.read_key() GameScene.change(DungeonScene())
class EndingScene(Scene): def __init__(self): Scene.__init__(self) self._screen = Screen() def initialize(self): self._screen.clear() self._screen.set_color(Color.RED) self._screen.write('You Won!!') self._screen.move((0, 1)) self._screen.set_color(Color.YELLOW) self._screen.write('-- Press Any Key --') def update(self): key = self._screen.read_key() Game.over()