from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) # from otree_tools.models.fields import OtherModelField import random import itertools author = 'Celine Zhang' doc = """ This is a one-period public goods game with 32 players and 4 per group. """ class Constants(BaseConstants): name_in_url = 'game1nd' players_per_group = None num_rounds = 1 instructions_template = 'dictator/instructions.html' endowment = c(100) class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): decision1 = models.CurrencyField( min=0, max=Constants.endowment, ) decision2 = models.CurrencyField( min=0, max=Constants.endowment, ) decision3 = models.CurrencyField( min=0, max=Constants.endowment, ) ndom1 = models.CurrencyField( min=0, max=Constants.endowment, ) ndom2 = models.CurrencyField( min=0, max=Constants.endowment, ) ndom3 = models.CurrencyField( min=0, max=Constants.endowment, ) newcheck = models.CharField(choices=['Reward up to 60 points to any Group Member.', 'Remove up to 60 points from any Group Member.', 'Increase the size of the Group Project by 60 points.' ], widget=widgets.RadioSelect) newcheck2 = models.CharField(choices=['Person 1', 'Person 2', 'Person 3' ], widget=widgets.RadioSelect) s1q1attempt = models.IntegerField(initial=0) subjectid = models.CharField(initial='')