Пример #1
0
 def end (self, status, reason):
     if self.status in UNFINISHED_STATES:
         self.__disconnect()
         
         if self.isObservationGame():
             self.connection.bm.unobserve(self.ficsgame)
         else:
             self.connection.om.offer(Offer(ABORT_OFFER), -1)
             self.connection.om.offer(Offer(RESIGNATION), -1)
     
     GameModel.end(self, status, reason)
Пример #2
0
    def end(self, status, reason):
        if self.status in UNFINISHED_STATES:
            self.__disconnect()

            if self.inControl:
                self.connection.om.offer(Offer(ABORT_OFFER), -1)
                self.connection.om.offer(Offer(RESIGNATION), -1)
            else:
                self.connection.bm.unobserve(self.gameno)

        GameModel.end(self, status, reason)
 def end (self, status, reason):
     if self.status in UNFINISHED_STATES:
         self.__disconnect()
         
         if self.inControl:
             self.connection.om.offer(Offer(ABORT_OFFER), -1)
             self.connection.om.offer(Offer(RESIGNATION), -1)
         else:
             self.connection.bm.unobserve(self.gameno)
     
     GameModel.end(self, status, reason)
Пример #4
0
    def end(self, status, reason):
        if self.status in UNFINISHED_STATES:
            self.__disconnect()

            if self.isObservationGame():
                self.connection.bm.unobserve(self.ficsgame)
            else:
                self.connection.om.offer(Offer(ABORT_OFFER), -1)
                self.connection.om.offer(Offer(RESIGNATION), -1)

        if status == KILLED:
            GameModel.kill(self, reason)
        else:
            GameModel.end(self, status, reason)
Пример #5
0
    def end(self, status, reason):
        if self.examined:
            self.connection.bm.unexamine()

        if self.status in UNFINISHED_STATES:
            self.__disconnect()

            if self.isObservationGame():
                self.connection.bm.unobserve(self.ficsgame)
            else:
                self.connection.om.offer(Offer(ABORT_OFFER))
                self.connection.om.offer(Offer(RESIGNATION))

        if status == KILLED:
            GameModel.kill(self, reason)
        else:
            GameModel.end(self, status, reason)