from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) import random doc = """ author: wb """ class Constants(BaseConstants): name_in_url = 't2_part3_undercutting_ss' players_per_group = None num_rounds = 1 l1={ 1:[16,25,15,15,15,15,4], 2:[5,15,25,15,15,15,15], 3:[15,5,15,25,15,15,15], 4:[15,15,5,15,25,25,25], 5:[15,15,15,5,15,15,15], 6:[15,15,15,5,15,15,15], 7:[15,15,15,5,15,15,4], } surepayoff = 15 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): treatment = models.IntegerField( label="", blank=True ) q_a1 = models.IntegerField( label="", blank=False ) q_a2 = models.IntegerField( label="", blank=False ) q_b1 = models.IntegerField( label="", blank=False ) q_b2 = models.IntegerField( label="", blank=False ) choice1 = models.IntegerField( max=7, min=1, label="", blank=False ) playagain = models.IntegerField( choices=[ [1, 'Yes'], [0, 'No'], ], label="", widget=widgets.RadioSelectHorizontal, blank=False ) choice2 = models.IntegerField( max=7, min=1, label="", blank=False ) tirage1 = models.FloatField() choicejoueur2 = models.IntegerField() gaintask1 = models.IntegerField() tirage2 = models.FloatField() choicejoueur2_task2 = models.IntegerField() gaintask2 = models.IntegerField()