from otree.api import Currency as c, currency_range from . import pages from ._builtin import Bot from .models import Constants import random class PlayerBot(Bot): def play_round(self): if self.round_number == 1: yield pages.Instructions contribution = random.randint(0, Constants.endownment) yield pages.Contributions, {'contribution': contribution} yield pages.Results if self.round_number == Constants.num_rounds: yield pages.FinalResults