created surface.py and GameSurface class

This commit is contained in:
2023-05-13 13:07:33 -04:00
parent 41ab0406f8
commit 83a7e98a7f
7 changed files with 82 additions and 89 deletions

View File

@@ -63,7 +63,7 @@ class Menu:
:param kwargs: keyword arguments to be passed to the function
"""
try:
return self._options[self._selection].run(*args, **kwargs)
return self._options[self._selection].preprocess(*args, **kwargs)
except IndexError as ex:
raise Exception('menu has no options, cannot run a non-existent option') from ex