Exemplo n.º 1
0
class GoBang(QObject):
    #gobang = None

    #@classmethod
    #def GetGoBang(cls):
    #    if cls.gobang == None:
    #        return GoBang()
    #    else:
    #        return cls.gobang

    def __init__(self):
        QObject.__init__(self,None)
        self.initData()

    def initData(self):
        self.clientThread = None
        self.loginWindow = Login(self)
        self.hall = None
        self.chessRoom = None
        self.playerNickname = ""

    def serverCrashedAlert(self):
        QMessageBox.about(None, u"server crashed", u"server is crashed!")

    def run(self):
        self.loginWindow.show()
Exemplo n.º 2
0
class GoBang(QObject):
    #gobang = None

    #@classmethod
    #def GetGoBang(cls):
    #    if cls.gobang == None:
    #        return GoBang()
    #    else:
    #        return cls.gobang

    def __init__(self):
        QObject.__init__(self, None)
        self.initData()

    def initData(self):
        self.clientThread = None
        self.loginWindow = Login(self)
        self.hall = None
        self.chessRoom = None
        self.playerNickname = ""

    def serverCrashedAlert(self):
        QMessageBox.about(None, u"server crashed", u"server is crashed!")

    def run(self):
        self.loginWindow.show()