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.Groupings) yield (pages.Role) choice = randint(1, 4) yield(pages.Scenario, {'choice': choice}) yield (pages.Break) elif self.round_number == 2: choice = randint(1, 5) yield(pages.Scenario, {'choice': choice}) yield (pages.Break) else: choice = randint(1, 2) yield(pages.Scenario, {'choice': choice})