from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Introduction(Page): def is_displayed(self): return self.group.round_number == 1 class ComprehensionWaitPage(WaitPage): body_text = "Waiting for other players in the group to finish reading instructions." def is_displayed(self): return self.group.round_number == 1 class InterRoundWaitPage(WaitPage): body_text = "Waiting to enter the next round" def is_displayed(self): return self.group.round_number != 1 class NegotiationsPage(Page): form_model = 'player' form_fields = ['merger_type', 'merger_share'] timeout_seconds = 8 * 60 # change this to that the contract page is skipped def before_next_page(self): player = self.player timeout_happened = self.timeout_happened if timeout_happened: pass class ResultsWaitPage(WaitPage): body_text = "Waiting for companies in your group to finish filling their contracts" after_all_players_arrive = "verify_contracts" class Results(Page): pass # page_sequence = [Introduction, ComprehensionWaitPage, NegotiationsPage, Results] page_sequence = [Introduction, ComprehensionWaitPage, InterRoundWaitPage, NegotiationsPage, ResultsWaitPage, Results]