from otree.api import Currency as c, currency_range from . import pages from ._builtin import Bot from .models import Constants class PlayerBot(Bot): def play_round(self): yield (pages.Introduction) yield (pages.Basics, {'state': "NY", 'state_years': 21, 'age': 33, 'education': 'Less than high school', }) if self.player.state == "NY": yield (pages.Main1_NY, {'attention1': False}) elif self.player.state == "NJ": yield (pages.Main1_NJ,{'attention1': True}) else: yield (pages.Main1_ME,{'attention1': True}) if self.player.display1() and self.player.attention1 == True: yield (pages.Main2, {'attention2': False, 'approve_ever': 93, 'approve_month': 67}) if self.player.display1() and self.player.attention(): if self.player.condition == 'illegal': yield (pages.Main3, {'donation': 33 }) yield (pages.Wait) else: yield (pages.Wait) if not self.player.attention(): yield (pages.Results_kick) yield (pages.Results)