'Setup the server.
Args:
application (Application): An instantiated Twisted application'

def __init__(self, application):

    sys.path.append('.')
    self.services = service.IServiceCollection(application)
    self.amp_protocol = None
    self.sessions = PORTAL_SESSIONS
    self.sessions.portal = self
    reactor.addSystemEventTrigger('before', 'shutdown', self.shutdown, _reactor_stopping=True)
    self.game_running = False
