This repository has been archived on 2019-12-09. You can view files and clone it, but cannot push or open issues or pull requests.
pacman2/engine/servers/input.py
2019-12-04 18:17:52 +01:00

18 lines
324 B
Python

from .server import Server
from pygame import event
from pygame.locals import QUIT
class StopException(RuntimeError): pass
class InputServer(Server):
def __init__(self):
super().__init__()
def step(self):
for e in event.get():
if e.type == QUIT:
raise StopException