Skip to main content
2 of 2
fixed spelling

Gladiolen

class Gladiolen(Bot):
    numThrows = 6

    def make_throw(self, scores, last_round):
        i = self.index

        if last_round:
            others = scores[:i] + scores[i+1:]
            target = max(others) - scores[i]
            while sum(self.current_throws) <= target:
                yield True
            yield False
        else:
            target = 33 - scores[i]
            for _ in range(self.numThrows):
                if sum(self.current_throws) >= target:
                    yield False
                yield True
            yield False

Gladiolen starts off boldly, throwing seven times in a row. But when it comes close to 40, it'll slow down, hoping for somebody else to hit 40 first. When the last_round kicks in, it is "der Tod oder die Gladiolen" again. If you don't know what that means, you should google it:)