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): if self.participant.vars["Passed"] == 0: yield pages.Quiz_intro if self.participant.vars["Passed"] == 0: yield pages.Q1, dict(Q1=-2) if self.participant.vars["Passed"] == 0: yield pages.Q1_result if self.participant.vars["Passed"] == 0: yield pages.Q2, dict(Q2=0) if self.participant.vars["Passed"] == 0: yield pages.Q2_result if self.participant.vars["Passed"] == 0: yield pages.Q3, dict(Q3=1) if self.participant.vars["Passed"] == 0: yield pages.Q3_result if self.participant.vars["Passed"] == 0: yield pages.Q4, dict(Q4=0) if self.participant.vars["Passed"] == 0: yield pages.Q4_result if self.participant.vars["Passed"] == 0: yield pages.Q5, dict(Q5=-2) if self.participant.vars["Passed"] == 0: yield pages.Q5_result if self.participant.vars["Passed"] == 0: yield pages.Q6, dict(Q6=-2) if self.participant.vars["Passed"] == 0: yield pages.Q6_result if self.player.correct < 5 and self.participant.vars["Passed"] == 0: yield pages.Quiz_result_fail if self.player.correct >= 5 and self.participant.vars["Passed"] == 0: yield pages.Quiz_result_success