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) if self.player.id_in_group == 1: yield (pages.Amount, {'amount_fortwo': c(30)}) yield (pages.Amount_confidence,{'amount_confidence':1} yield (pages.Results,{'results_happy': 2}) yield (pages.Offer, {'amount_offered': c(10)}) else: yield (pages.trust_amount, {'amount_trust': 3}) yield (pages.Accept, {'offer_accepted': True}) yield (pages.Results,{'results_happy': 3})