from otree.api import Currency as c, currency_range, expect, Bot from . import * class PlayerBot(Bot): def play_round(self): if self.player.round_number == 1: yield IDProlific_input, dict(IDP=self.player.id_in_subsession, IDP_2=self.player.id_in_subsession) yield Ind_Instruction if self.player.round_number == 1: yield Ind_Instruction1 yield Ind_b1 if get_timeout_seconds1(self.player) > 0 and self.player.participant.questions_mod1: yield ( Ind_module1, dict(choicen1=self.player.solution_n), ) if self.player.participant.questions_mod2 and self.player.participant.intro2: yield Ind_Instruction2 yield Ind_b2 if self.player.participant.questions_mod2: yield ( Ind_module2, dict(choicea1_1=self.player.solution_a), ) if self.player.participant.questions_mod3 and self.player.participant.intro3: yield Ind_Instruction3 yield Ind_b3 if self.player.participant.questions_mod3: if self.player.key_s == '5': yield ( Ind_module3, dict(spa_1='A'), ) if self.player.key_s == '4': yield ( Ind_module3, dict(spa_2='B'), ) if self.player.participant.time_out and self.player.round_number == C.NUM_ROUNDS: yield Ind_Results