from ._builtin import Page, WaitPage from otree.api import Currency as c, currency_range from .models import Constants class Introduction(Page): """Description of the game: How to play and returns expected""" def is_displayed(self): return self.round_number == 1 class Decision(Page): """Player: Choose whether to get vaccinated""" form_model = 'player' form_fields = ['decision'] class ResultsWaitPage(WaitPage): def after_all_players_arrive(self): self.group.set_random_vars() self.group.work_out_no_vaccinated() self.group.work_out_prob_catching_illness() self.group.set_outcomes() self.group.set_payoffs() body_text = "Waiting for other participants to make their decisions." class Results(Page): """Player payoffs""" pass page_sequence = [ Introduction, Decision, ResultsWaitPage, Results ]