from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Instructions(Page): def is_displayed(self): return self.round_number == 1 def before_next_page(self): if self.round_number == 1: self.participant.vars['AtC_payoff'] = 0 class BidPage(Page): form_model = 'player' form_fields = ['bid'] def before_next_page(self): self.player.set_payoff() def vars_for_template(self): p = self.player lo = Constants.lo_value + p.shifted * Constants.shift_value hi = Constants.hi_value + p.shifted * Constants.shift_value return dict( lo=lo, hi=hi, ) class Results(Page): pass page_sequence = [ Instructions, BidPage, Results ]