Exemplo n.º 1
0
	def run(self):
		try:
			info = self.conf.getGameStateServerInfo()
			self.server = BotCommServer(info.port,info.key,info.iv,self.gamelogic)
			asyncore.loop()
		except KeyboardInterrupt:
			print "GameStateBot caught keyboard interrupt.."
Exemplo n.º 2
0
class GameServerBot(Process):
    def __init__(self, conf, gamelogic):
        Process.__init__(self)
        self.conf = conf
        self.gamelogic = gamelogic
        self.server = None

    def run(self):
        try:
            info = self.conf.getGameStateServerInfo()
            self.server = BotCommServer(info.port, info.key, info.iv,
                                        self.gamelogic)
            asyncore.loop()
        except KeyboardInterrupt:
            print "GameStateBot caught keyboard interrupt.."

    def stop(self):
        self.server.close()
Exemplo n.º 3
0
class GameStateBot(Process):

	def __init__(self, conf, gamelogic):
		Process.__init__(self)
		self.conf = conf
		self.gamelogic = gamelogic
		self.server = None

	def run(self):
		try:
			info = self.conf.getGameStateServerInfo()
			self.server = BotCommServer(info.port,info.key,info.iv,self.gamelogic)
			asyncore.loop()
		except KeyboardInterrupt:
			print "GameStateBot caught keyboard interrupt.."

	def stop(self):
		self.server.close()
Exemplo n.º 4
0
 def run(self):
     logic = TestLogic()
     srv = BotCommServer(port, key, iv, logic)
     asyncore.loop()