Пример #1
0
    def compute_match(self, pla, plb, base):
        obj = Match(self._num)
        obj.set_players([pla[0], plb[0]])
        obj.compute()
        inst = obj.random_instance_detail(new=True)

        if inst[1] > inst[2]:
            plb = plb[1:]
        else:
            pla = pla[1:]

        if len(plb) != 0 and len(pla) != 0:
            self.compute_match(pla, plb, base)
        elif len(plb) == 0:
            self._tally[0][1] += base
            self._tally[1][0] += base
        else:
            self._tally[1][1] += base
            self._tally[0][0] += base
Пример #2
0
    def compute_match(self, pla, plb, base):
        obj = Match(self._num)
        obj.set_players([pla[0], plb[0]])
        obj.compute()
        inst = obj.random_instance_detail(new=True)

        if inst[1] > inst[2]:
            plb = plb[1:]
        else:
            pla = pla[1:]

        if len(plb) != 0 and len(pla) != 0:
            self.compute_match(pla, plb, base)
        elif len(plb) == 0:
            self._tally[0][1] += base
            self._tally[1][0] += base
        else:
            self._tally[1][1] += base
            self._tally[0][0] += base