from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Introduction(Page): pass class Decision(Page): form_model = 'player' form_fields = ['stage1_keep'] class ResultsWaitPage(WaitPage): def after_all_players_arrive(self): for p in self.group.get_players(): p.set_payoff() class Results(Page): def vars_for_template(self): return { 'stage1': self.player.stage1_keep, 'stage1_give': 50-self.player.stage1_keep, 'stage2': self.player.stage2_receive, 'payoff': self.player.payoff, } class ACTION_end_of_game(Page): pass class end_of_game(Page): pass page_sequence = [ Introduction, Decision, ResultsWaitPage, #Results #ACTION_end_of_game, end_of_game, ]