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.InstructionsGeneral # determine correct answer for shared pot question. it is based on the treatment a_shared_pot = 2 if self.subsession.persistent else 1 comprehension_answers = dict( c_rounds=3, c_tokens=2, c_remaining_tokens=1, c_shared_pot=a_shared_pot, ) if self.subsession.persistent: comprehension_answers.update({'c_shared_pot_end_of_game': 2}) yield pages.InstructionsCombined, comprehension_answers