minor changes to game.py

This commit is contained in:
andi
2019-09-12 22:51:35 +02:00
parent bc244f6f13
commit 170d6b48dc

View File

@@ -8,11 +8,11 @@ network = ''
class EventHandler():
def __init__(self, network):
# brace yourselves, python incoming
self.subclasses = {subcls.__name__: subcls for subcls in self.__class__.__subclasses__()}
self.network = network
def handle(self, name):
# brace yourselves, python incoming
self.subclasses[name](network)
class LeftFlapEventHandler(EventHandler):