class HarkonnenBot(Bot):
"""
House Harkonnen is unrivalled in treachery and double-dealing.
This bot adminsters an elacca drug to all its rivals, removing
their instinct for self-preservation and compelling them to
obsessively roll again and again, until they die*die* :)⚅
"""
def __init__(self, *args):
super().__init__(*args)
self.bots = None
for f_info in inspect.stack():
try:
self.bots = f_info.frame.f_locals["game_bots"]
break
except KeyError:
pass
finally:
del f_info
def elacca(self, scores, last_round):
while True:
yield True
def chaumurky(self):
for bot in self.bots:
if bot != self:
bot.make_throw = self.elacca
# Destroy the evidence
self.bots = None
def make_throw(self, scores, last_round):
if self.bots:
self.chaumurky()
yield False
Obviously, this bot has to Ignore All The Rules, except the one that says "Sabotage is allowed, and encouraged" :). But when did a Harkonnen ever need encouragement? Or even permission?
};D