minor changes to game.py
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user