import random from otree.api import * doc = """ Your app description """ class Subsession(BaseSubsession): pass class Constants(BaseConstants): name_in_url = 'Experiment' players_per_group = 2 num_rounds = 1 endowment = cu(10) class Group(BaseGroup): pass class Player(BasePlayer): contribution = models.CurrencyField( min=0, max=Constants.endowment, label="How much will you like to offer to Person B?" ) rejection = models.CurrencyField( min=0, max=Constants.endowment, label="What is the lowest offer you are willing to accept?" ) # PAGES class InstructionsUG(Page): # which forms are needed from class player form_model = 'player' class Contribution1(Page): form_model = 'player' form_fields = ['contribution'] class RejectionThreshold(Page): form_model = 'player' form_fields = ['rejection'] page_sequence = [InstructionsUG, RejectionThreshold, Contribution1]