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.Instructions), yield(pages.UQ, {'uq1': 3, 'uq2': 2, 'uq3': 3}), yield(pages.Description, {'choice': 2}), if self.participant.vars['choice'] is 1: yield (pages.WillingnessToPay1, {'image_choice': 1, 'switching_point': c(0.5)}), else: yield (pages.WillingnessToPay2, {'education': 1, 'switching_point': c(0.5)}), yield(pages.Results)