from otree.api import Currency as c, currency_range from . import pages from ._builtin import Bot from .models import Constants from random import randint class PlayerBot(Bot): def play_round(self): if self.round_number == 1: yield (pages.Instructions) yield (pages.Question_tosca, {'answer_a': randint(1, 5), 'answer_b': randint(1, 5), 'answer_c': randint(1, 5), 'answer_d': randint(1, 5),}) if self.round_number == Constants.num_rounds: yield (pages.Results, {'feedback': "nice feedback!"})