terminal.py 542B

12345678910111213141516171819
  1. # coding: utf-8
  2. from synergine2.terminals import Terminal
  3. from synergine2.terminals import TerminalPackage
  4. class GameTerminal(Terminal):
  5. def __init__(self, *args, **kwargs):
  6. super().__init__(*args, **kwargs)
  7. self.gui = None
  8. def receive(self, package: TerminalPackage):
  9. self.gui.before_received(package)
  10. # TODO: pas d'event après le move: il faut subscribe je crois :p
  11. super().receive(package)
  12. self.gui.after_received(package)
  13. def run(self):
  14. raise NotImplementedError()