from otree.api import Currency as c, currency_range from . import pages from ._builtin import Bot from .models import Constants import random class PlayerBot(Bot): def play_round(self): yield (pages.Introduction) yield (pages.ComprehensionCheck, {'comp_checkA': random.randint(0,1), 'comp_checkB': random.randint(0,1), 'comp_checkC': random.randint(0,1), 'comp_checkD': random.randint(0,1)}) if self.player.comp_checkA == 0 or self.player.comp_checkB == 1 or self.player.comp_checkC == 0 or self.player.comp_checkD == 0: yield (pages.ComprehensionCheckFail) yield (pages.End, {'name': 'SD'}) else: yield (pages.End, {'name': 'SD'})