terminal.py 510B

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