minor changes to game.py

This commit is contained in:
andi
2019-09-12 22:51:35 +02:00
parent 90ee8d2e17
commit eb09b227b1

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):