from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Introduction(Page): def is_displayed(player): return player.round_number == 1 class Choice(Page): form_model = 'player' form_fields = ['number'] class ChoiceWait(WaitPage): def after_all_players_arrive(self): self.group.set_payoffs() class Results(Page): pass class ShuffleWaitPage(WaitPage): wait_for_all_groups = True @staticmethod def after_all_players_arrive(subsession): subsession.group_randomly() class Final(Page): def is_displayed(player): return player.round_number == 20 page_sequence = [Introduction, Choice, ChoiceWait, Results, ShuffleWaitPage, Final]