from otree.api import Currency as c from . import pages from ._builtin import Bot from .models import Constants class PlayerBot(Bot): def play_round(self): yield pages.Intro yield pages.Effort, dict(effort=40) yield pages.Effort_result yield pages.Strategy_intro if self.player.effort == 40: yield pages.Active_strategy_low_earnings, dict( strategy_low_earning="High earnings", ) if self.player.effort == 10: yield pages.Inactive_strategy_low_earnings, dict( strategy_low_earning="High earnings", ) yield pages.Earnings_result if self.player.earning == "High": yield pages.Report_earnings_high if self.player.earning == "Low": yield pages.Report_earnings_low if self.player.condition == "HighHigh earnings": yield pages.High_earning_strategy_high if self.player.condition_2 == "HighHigh earningsNo": yield pages.No_audit if self.player.condition_2 == "HighHigh earningsYes": yield pages.Audit_honest if self.player.condition == "LowHigh earnings": yield pages.Low_earning_strategy_high if self.player.condition_2 == "LowHigh earningsNo": yield pages.No_audit_2 if self.player.condition_2 == "LowHigh earningsYes": yield pages.Audit_dishonest if self.player.condition == "LowLow earnings": yield pages.Low_earning_strategy_low yield pages.Payoff yield pages.Payoff_2