Source code for xoinvader.handlers

"""Base handler class."""

[docs]class Command(object): """Base command class."""
[docs] def execute(self, actor): """Execute command with actor. :param actor: actor :type: actor: object .. note:: Make actor base class. """ raise NotImplementedError
[docs]class Handler(object): """ Base game handler. Provides accessing to main State's fields and handle function stub. :param owner: handler's owner :type owner: :class:`xoinvader.state.State` """ def __init__(self, owner): self._owner = owner self._screen = owner.screen self._actor =
[docs] def handle(self): """Handle event.""" raise NotImplementedError