from otree.api import Currency as c, currency_range, expect, Bot from . import * class PlayerBot(Bot): def play_round(self): import random if self.player.id_in_group == 1: yield PriceA, dict(price1=random.randint(1,6), price2=random.randint(6,11)) if self.player.id_in_group == 2: yield Interaction, dict(interaction=random.randint(0,1)) if self.group.interaction==1 and self.player.id_in_group == 2: yield Gift, dict(gift=random.randint(0,1)) if self.group.interaction== 1 and self.player.id_in_group == 1: yield DecisionA, dict(action=random.randint(1,2), price=random.randint(1,2)) yield Results