diff --git a/roguebasin/__init__.py b/roguebasin/__init__.py index 666a09c..12ba5c3 100644 --- a/roguebasin/__init__.py +++ b/roguebasin/__init__.py @@ -1,2 +1 @@ -#!/usr/bin/env python3 # Eryn Wells diff --git a/roguebasin/__main__.py b/roguebasin/__main__.py index e745f9b..eeb6912 100644 --- a/roguebasin/__main__.py +++ b/roguebasin/__main__.py @@ -78,7 +78,10 @@ def main(argv): engine.handle_event(event) def run_until_exit(): - '''Run the package's main() and call sys.exit when it finishes.''' + ''' + Run main() and call sys.exit when it finishes. In practice, this function will never return. The game engine has + other mechanisms for exiting. + ''' result = main(sys.argv) sys.exit(0 if not result else result) diff --git a/roguebasin/events.py b/roguebasin/events.py index 1cd5077..49ecc1f 100644 --- a/roguebasin/events.py +++ b/roguebasin/events.py @@ -1,6 +1,7 @@ -#!/usr/bin/env python3 # Eryn Wells +'''Defines event handling mechanisms.''' + from typing import Optional import tcod @@ -9,6 +10,8 @@ from .actions import Action, ExitAction, RegenerateRoomsAction, BumpAction from .geometry import Direction class EventHandler(tcod.event.EventDispatch[Action]): + '''Handler of `tcod` events''' + def ev_quit(self, event: tcod.event.Quit) -> Optional[Action]: return ExitAction()