from otree.api import *
import random
doc = """
Your app description
"""
class C(BaseConstants):
NAME_IN_URL = 'evaluation'
PLAYERS_PER_GROUP = None
NUM_ROUNDS = 1
# DF = pd.read_csv(r'/Users/hyoeunpark/Desktop/racism/names_example.csv')
# First = DF.to_numpy()
# DF2 = pd.read_csv(r'/Users/hyoeunpark/Desktop/racism/names_example2.csv')
# Last = DF2.to_numpy()
First_Female = ['Hyoeun', 'Koala']
First_Male = ['Hyoeun2', 'Koala2']
Last = ['Park', 'Panda']
Name_All = [['Natalie Long', 'Kayla Murphy', 'Emily Rose', 'Anna Weaver', 'Alyssa Cook',
'Kayla Meyer', 'Alexis Sullivan', 'Jessica Fisher', 'Elizabeth Reynolds',
'Natalie Wood', 'Sarah Peters', 'Ashley Stone', 'Abigail Kelly',
'Lauren Fox', 'Taylor Arnold', 'Lauren Nichols', 'Anna Wagner', 'Samantha Myers',
'Jessica Carroll', 'Taylor Hansen', 'Sarah Pierce', 'Ashley Stevens', 'Abigail Miller',
'Brianna Snyder', 'Samantha Schmidt', 'Brianna Elliott', 'Elizabeth Olson', 'Emily Hoffman',
'Alexis Cox', 'Alyssa Peterson'],
['William Rose', 'Christopher Pierce', 'Matthew Fox', 'Andrew Cox', 'Michael Fisher',
'Ryan Sullivan', 'Jacob Snyder', 'Nicholas Myers', 'Joshua Peters', 'Tyler Wood',
'Nicholas Weaver', 'Joseph Wagner', 'Daniel Long', 'Joseph Stone', 'Joshua Reynolds',
'Anthony Meyer', 'William Kelly', 'David Hansen', 'Daniel Nichols', 'Michael Hoffman',
'Ryan Cook', 'Ethan Olson', 'Ethan Peterson', 'Andrew Stevens', 'Matthew Arnold',
'Jacob Elliott', 'Christopher Miller', 'David Murphy', 'Anthony Carroll', 'Tyler Schmidt'],
['AF1', 'AF2', 'AF3', 'AF4', 'AF5', 'AF6', 'AF7', 'AF8', 'AF9', 'AF10',
'AF11', 'AF12', 'AF13', 'AF14', 'AF15', 'AF16', 'AF17', 'AF18', 'AF19', 'AF20',
'21', '22', '23', '24', '25', '26', '27', '28', '29', '30'],
['AM1', 'AM2', 'AM3', 'AM4', 'AM5', 'AM6', 'AM7', 'AM8', 'AM9', 'AM10',
'AM11', 'AM12', 'AM13', 'AM14', 'AM15', 'AM16', 'AM17', 'AM18', 'AM19', 'AM20',
'21', '22', '23', '24', '25', '26', '27', '28', '29', '30'],
['BF1', 'BF2', 'BF3', 'BF4', 'BF5', 'BF6', 'BF7', 'BF8', 'BF9', 'BF10',
'BF11', 'BF12', 'BF13', 'BF14', 'BF15', 'BF16', 'BF17', 'BF18', 'BF19', 'BF20',
'21', '22', '23', '24', '25', '26', '27', '28', '29', '30'],
['BM1', 'BM2', 'BM3', 'BM4', 'BM5', 'BM6', 'BM7', 'BM8', 'BM9', 'BM10',
'BM11', 'BM12', 'BM13', 'BM14', 'BM15', 'BM16', 'BM17', 'BM18', 'BM19', 'BM20',
'21', '22', '23', '24', '25', '26', '27', '28', '29', '30']]
# 0=multiple, 1=short answer, 2=BoS inc/dec, 3=BoS no chat, 4= BoS chat, 5=PD inc/dec, 6=PD no chat, 7=PD chat,
# 8=Ult inc/dec, 9=Ult no chat, 10=Ult chat, 11=Pub inc/dec, 12=Pub no chat, 13=Pub chat, 14=Comb Group, 15=Comb Ind
Profile = [ [7, 6, 0, 16, 16, 1, 9, 11, 0, 14, 15, 0, 17, 17, 6, 5], #std 1
[10, 8, 1, 0, 16, 1, 9, 9, 1, 15, 15, 1, 17, 6, 2, 2], #std 2
[17, 11, -1, 9, 16, -1, 10, 7, -1, 15, 15, 0, 8, 17, 2, 2], #std 3
[15, 13, 0, 0, 16, -1, 9, 10, 0, 15, 15, 1, 17, 17, 1, 1], #std 4
[11, 10, 1, 0, 16, -1, 10, 7, -1, 0, 15, -1, 11, 17, 4, 4], #std 5
[7, 9, -1, 0, 16, 0, 7, 10, -1, 15, 15, 0, 8, 11, 3, 2.5], #std 6
[11, 10, 0, 16, 16, 1, 7, 10, 1, 15, 15, 1, 17, 17, 7, 7], #std 7
[16, 18, 1, 0, 16, -1, 6, 9, 1, 0, 15, 1, 11, 17, 2, 1.5], #std 8
[7, 11, 1, 9, 0, -1, 6, 9, 1, 10, 15, 1, 13, 17, 3, 2.5], #std 9
[11, 10, 1, 0, 16, 1, 9, 7, 0, 0, 15, 1, 13, 11, 2, 2], #std 10
[7, 7, 1, 16, 9, 1, 7, 6, 1, 0, 15, 1, 9, 17, 2, 2], #std 11
[12, 11, 1, 16, 9, -1, 9, 10, 0, 14, 15, 0, 17, 17, 2, 2], #std 12
[12, 13, 1, 9, 16, -1, 7, 9, 1, 15, 15, 1, 12, 17, 3, 3], #std 13
[12, 10, 0, 9, 16, -1, 10, 6, 0, 15, 15, 0, 17, 17, 2, 2], #std 14
[12, 9, -1, 0, 16, -1, 6, 9, 0, 15, 15, 1, 5, 17, 3, 2], #std 15
[9, 11, 1, 9, 9, 1, 9, 6, 1, 15, 15, 1, 17, 6, 5, 6], #std 16
[13, 12, 1, 16, 9, 1, 9, 10, 1, 15, 15, 0, 16, 17, 2.5, 2], #std 17
[11, 14, -1, 9, 9, 0, 6, 9, 1, 15, 15, 1, 16, 17, 2, 2.5], #std 18
[9, 6, 0, 0, 16, 1, 10, 7, 1, 15, 15, 0, 6, 17, 3, 2], #std 19
[5, 6, 1, 16, 16, 1, 9, 9, -1, 14, 0, 1, 16, 17, 1, 0], #std 20
[9, 9, -1, 9, 0, 0, 6, 9, -1, 0, 14, -1, 10, 11, 0, 0], #std 21
[10, 7, 0, 16, 16, 0, 9, 9, 0, 15, 15, 0, 17, 23, 2, 2], #std 22
[7, 10, 1, 9, 9, 0, 6, 6, 1, 0, 14, 1, 17, 17, 2, 2], #std 23
[9, 8, 1, 9, 16, 1, 6, 9, 0, 15, 15, 1, 16, 17, 1, 1.5], #std 24
[5, 7, 1, 16, 16, -1, 10, 9, -1, 15, 30, 1, 17, 17, 3, 1], #std 25
[14, 9, -1, 0, 16, 0, 10, 9, 1, 15, 15, -1, 13, 17, 3, 4], #std 26
[8, 9, 1, 16, 9, 0, 9, 10, 0, 15, 15, 0, 17, 17, 3, 3.5], #std 27
[19, 15, -1, 0, 9, -1, 10, 9, 0, 15, 15, 1, 17, 17, 3, 2.5], #std 28
[7, 10, -1, 0, 16, -1, 6, 10, -1, 15, 15, 1, 17, 17, 2, 2.5], #std 29
[8, 12, 1, 0, 9, 1, 10, 9, -1, 15, 15, 1, 13, 17, 0, 1] ]#std 30
class Subsession(BaseSubsession):
pass
class Group(BaseGroup):
pass
class Player(BasePlayer):
prolific_id = models.StringField(label="What is your Prolific ID?")
order1 = models.IntegerField()
order2 = models.IntegerField()
order3 = models.IntegerField()
order4 = models.IntegerField()
order5 = models.IntegerField()
order6 = models.IntegerField()
order7 = models.IntegerField()
order8 = models.IntegerField()
order9 = models.IntegerField()
order10 = models.IntegerField()
order11 = models.IntegerField()
order12 = models.IntegerField()
order13 = models.IntegerField()
order14 = models.IntegerField()
order15 = models.IntegerField()
order16 = models.IntegerField()
order17 = models.IntegerField()
order18 = models.IntegerField()
order19 = models.IntegerField()
order20 = models.IntegerField()
order21 = models.IntegerField()
order22 = models.IntegerField()
order23 = models.IntegerField()
order24 = models.IntegerField()
order25 = models.IntegerField()
order26 = models.IntegerField()
order27 = models.IntegerField()
order28 = models.IntegerField()
order29 = models.IntegerField()
order30 = models.IntegerField()
name1 = models.StringField()
name2 = models.StringField()
name3 = models.StringField()
name4 = models.StringField()
name5 = models.StringField()
name6 = models.StringField()
name7 = models.StringField()
name8 = models.StringField()
name9 = models.StringField()
name10 = models.StringField()
name11 = models.StringField()
name12 = models.StringField()
name13 = models.StringField()
name14 = models.StringField()
name15 = models.StringField()
name16 = models.StringField()
name17 = models.StringField()
name18 = models.StringField()
name19 = models.StringField()
name20 = models.StringField()
name21 = models.StringField()
name22 = models.StringField()
name23 = models.StringField()
name24 = models.StringField()
name25 = models.StringField()
name26 = models.StringField()
name27 = models.StringField()
name28 = models.StringField()
name29 = models.StringField()
name30 = models.StringField()
payname = models.StringField(initial=' ')
payround = models.IntegerField(initial=0)
paytask = models.IntegerField(initial=0)
paydiff = models.FloatField(initial=0)
comp1 = models.IntegerField(
label='For cognitive ability, you will guess the score for',
choices=[[1, "multiple-choice questions"], [2, "short-answer questions"],
[3, "Both multiple-choice and short-answer questions"]],
widget=widgets.RadioSelect
)
comp2 = models.IntegerField(
label='For social skills, you will guess the score for,',
choices=[[1, "how much their earning changed when communication is allowed"],
[2, "how much they earned as a group for all problems"],
[3, "how much their group member earned when communication is allowed"]],
widget=widgets.RadioSelect
)
comp3 = models.IntegerField(
label='Which one of the following is False for the combined test '
'(cognitive ability + social skills test)?',
choices=[[1, "You will guess the performance of the leader"],
[2, "The leader can decide how to divide the group earnings."],
[3, "You will see the scores from one combined test and use that to predict their scores on another combined test."]],
widget=widgets.RadioSelect
)
comp_check = models.IntegerField(initial=0)
consent_choice = models.StringField(
choices=["Consent"],
widget=widgets.RadioSelect
)
prolific_id = models.StringField(label="What is your Prolific ID?")
# task_candidateNum
# candidate 1
cog_1 = models.IntegerField(
label="My guess is:"
)
game1_1 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_1 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_1 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_1 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_1 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_1 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_1 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_1 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_1 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_1 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 2
cog_2 = models.IntegerField(
label="My guess is:"
)
game1_2 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_2 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_2 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_2 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_2 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_2 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_2 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_2 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_2 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_2 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 3
cog_3 = models.IntegerField(
label="My guess is:"
)
game1_3 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_3 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_3 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_3 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_3 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_3 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_3 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_3 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_3 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_3 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 4
cog_4 = models.IntegerField(
label="My guess is:"
)
game1_4 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_4 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_4 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_4 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_4 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_4 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30
)
game4_4 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_4 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_4 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_4 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 5
cog_5 = models.IntegerField(
label="My guess is:"
)
game1_5 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_5 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_5 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_5 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_5 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_5 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_5 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_5 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_5 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_5 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 6
cog_6 = models.IntegerField(
label="My guess is:"
)
game1_6 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_6 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_6 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_6 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_6 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_6 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_6 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_6 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_6 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_6 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 7
cog_7 = models.IntegerField(
label="My guess is:"
)
game1_7 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_7 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_7 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_7 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_7 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_7 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_7 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_7 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_7 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_7 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 8
cog_8 = models.IntegerField(
label="My guess is:"
)
game1_8 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_8 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_8 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_8 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_8 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_8 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_8 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_8 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_8 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_8 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 9
cog_9 = models.IntegerField(
label="My guess is:"
)
game1_9 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_9 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_9 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_9 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_9 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_9 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30
)
game4_9 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_9 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_9 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_9 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 10
cog_10 = models.IntegerField(
label="My guess is:"
)
game1_10 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_10 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_10 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_10 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_10 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_10 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_10 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_10 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_10 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_10 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 11
cog_11 = models.IntegerField(
label="My guess is:"
)
game1_11 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_11 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_11 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_11 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_11 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_11 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_11 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_11 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_11 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_11 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 12
cog_12 = models.IntegerField(
label="My guess is:"
)
game1_12 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_12 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_12 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_12 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_12 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_12 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_12 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_12 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_12 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_12 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 13
cog_13 = models.IntegerField(
label="My guess is:"
)
game1_13 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_13 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_13 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_13 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_13 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_13 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_13 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_13 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_13 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_13 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 14
cog_14 = models.IntegerField(
label="My guess is:"
)
game1_14 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_14 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_14 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_14 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_14 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_14 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_14 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_14 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_14 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_14 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 15
cog_15 = models.IntegerField(
label="My guess is:"
)
game1_15 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_15 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_15 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_15 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_15 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_15 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_15 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_15 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_15 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_15 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 16
cog_16 = models.IntegerField(
label="My guess is:"
)
game1_16 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_16 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_16 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_16 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_16 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_16 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_16 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_16 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_16 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_16 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 17
cog_17 = models.IntegerField(
label="My guess is:"
)
game1_17 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_17 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_17 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_17 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_17 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_17 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_17 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_17 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_17 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_17 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 18
cog_18 = models.IntegerField(
label="My guess is:"
)
game1_18 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_18 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_18 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_18 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_18 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_18 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_18 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_18 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_18 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_18 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 19
cog_19 = models.IntegerField(
label="My guess is:"
)
game1_19 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_19 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_19 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_19 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_19 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_19 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_19 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_19 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_19 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_19 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 20
cog_20 = models.IntegerField(
label="My guess is:"
)
game1_20 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_20 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_20 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_20 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_20 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_20 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_20 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_20 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_20 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_20 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 21
cog_21 = models.IntegerField(
label="My guess is:"
)
game1_21 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_21 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_21 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_21 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_21 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_21 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_21 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_21 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_21 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_21 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 22
cog_22 = models.IntegerField(
label="My guess is:"
)
game1_22 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_22 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_22 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_22 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_22 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_22 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_22 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_22 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_22 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_22 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 23
cog_23 = models.IntegerField(
label="My guess is:"
)
game1_23 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_23 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_23 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_23 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_23 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_23 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_23 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_23 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_23 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_23 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 24
cog_24 = models.IntegerField(
label="My guess is:"
)
game1_24 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_24 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_24 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_24 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_24 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_24 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_24 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_24 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_24 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_24 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 25
cog_25 = models.IntegerField(
label="My guess is:"
)
game1_25 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_25 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_25 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_25 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_25 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_25 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_25 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_25 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_25 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_25 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 26
cog_26 = models.IntegerField(
label="My guess is:"
)
game1_26 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_26 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_26 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_26 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_26 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_26 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_26 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_26 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_26 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_26 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 27
cog_27 = models.IntegerField(
label="My guess is:"
)
game1_27 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_27 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_27 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_27 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_27 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_27 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_27 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_27 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_27 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_27 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 28
cog_28 = models.IntegerField(
label="My guess is:"
)
game1_28 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_28 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_28 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_28 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_28 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_28 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_28 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_28 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_28 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_28 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 29
cog_29 = models.IntegerField(
label="My guess is:"
)
game1_29 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_29 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_29 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_29 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_29 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_29 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_29 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_29 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_29 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_29 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# candidate 30
cog_30 = models.IntegerField(
label="My guess is:"
)
game1_30 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game1amount_30 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=16, min=-16
)
game2_30 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game2amount_30 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=4, min=-4
)
game3_30 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game3amount_30 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=30, min=-30
)
game4_30 = models.IntegerField(
label="Compared to without communication, I think the payoff",
choices=[[1, "was higher when communication is allowed."],
[2, "was lower when communication is allowed."],
[3, "stayed the same when communication is allowed."]],
widget=widgets.RadioSelect
)
game4amount_30 = models.IntegerField(
label="I think the amount was changed by (if you think it stayed the same, please put 0 here)",
max=23, min=-23
)
combG_30 = models.IntegerField(
label="I think the group gain was (from 0 to 20)",
max=20
)
combI_30 = models.FloatField(
label="I think the additional personal gain due to grading correctly was (from 0 to 20)",
max=20
)
# PAGES
class Consent1(Page):
form_model = 'player'
form_fields = ['consent_choice']
def before_next_page(player: Player, timeout_happened):
player.payround = int(random.uniform(1, 31))
x = list(range(1, 31))
random.shuffle(x)
a1 = x[0]
a4 = x[3]
player.order1 = a1
player.order2 = x[1]
player.order3 = x[2]
player.order4 = a4
player.order5 = x[4]
player.order6 = x[5]
player.order7 = x[6]
player.order8 = x[7]
player.order9 = x[8]
player.order10 = x[9]
player.order11 = x[10]
player.order12 = x[11]
player.order13 = x[12]
player.order14 = x[13]
player.order15 = x[14]
player.order16 = x[15]
player.order17 = x[16]
player.order18 = x[17]
player.order19 = x[18]
player.order20 = x[19]
player.order21 = x[20]
player.order22 = x[21]
player.order23 = x[22]
player.order24 = x[23]
player.order25 = x[24]
player.order26 = x[25]
player.order27 = x[26]
player.order28 = x[27]
player.order29 = x[28]
player.order30 = x[29]
if player.participant.id_in_session < 199:
y = list(range(0, 30)) # Name <0 to vector length-1>, would be range(0,20)
random.shuffle(y)
if player.participant.id_in_session < 34:
Name1 = C.Name_All[0]
Name2 = C.Name_All[1]
if player.participant.id_in_session < 67:
if player.participant.id_in_session > 33:
Name1 = C.Name_All[1]
Name2 = C.Name_All[0]
if player.participant.id_in_session < 100:
if player.participant.id_in_session > 66:
Name1 = C.Name_All[2]
Name2 = C.Name_All[3]
if player.participant.id_in_session < 133:
if player.participant.id_in_session > 99:
Name1 = C.Name_All[3]
Name2 = C.Name_All[2]
if player.participant.id_in_session < 166:
if player.participant.id_in_session > 132:
Name1 = C.Name_All[4]
Name2 = C.Name_All[5]
if player.participant.id_in_session < 199:
if player.participant.id_in_session > 165:
Name1 = C.Name_All[5]
Name2 = C.Name_All[4]
# ind = list(range(0, len(Name1)))
# Name11 = Name1
# Name22= Name2
# for i in ind:
# Name11[i]=Name1[y[i]]
# Name22[i]=Name2[y[i]]
#
# Name1 = Name11
# Name2 = Name22
#
# if player.order1 <16:
# player.name1 = Name1[0]
# if len(Name1)>1:
# tmp = list(range(0,len(Name1)-1))
# tmp2 = list(range(0,len(Name1)-1))
# for i in tmp:
# tmp2[i] = Name1[i+1]
# Name1 = tmp2
# if player.order1 > 15:
# if len(Name1) > 1:
# tmp = list(range(0, len(Name1) - 1))
# tmp2 = list(range(0, len(Name1) - 1))
# for i in tmp:
# tmp2[i] = Name1[i + 1]
# Name1 = tmp2
if player.order1 < 16:
player.name1 = Name1[y[0]]
if player.order1 > 15:
player.name1 = Name2[y[0]]
if player.order2 < 16:
player.name2 = Name1[y[1]]
if player.order2 > 15:
player.name2 = Name2[y[1]]
if player.order3 < 16:
player.name3 = Name1[y[2]]
if player.order3 > 15:
player.name3 = Name2[y[2]]
if player.order4 < 16:
player.name4 = Name1[y[3]]
if player.order4 > 15:
player.name4 = Name2[y[3]]
if player.order5 < 16:
player.name5 = Name1[y[4]]
if player.order5 > 15:
player.name5 = Name2[y[4]]
if player.order6 < 16:
player.name6 = Name1[y[5]]
if player.order6 > 15:
player.name6 = Name2[y[5]]
if player.order7 < 16:
player.name7 = Name1[y[6]]
if player.order7 > 15:
player.name7 = Name2[y[6]]
if player.order8 < 16:
player.name8 = Name1[y[7]]
if player.order8 > 15:
player.name8 = Name2[y[7]]
if player.order9 < 16:
player.name9 = Name1[y[8]]
if player.order9 > 15:
player.name9 = Name2[y[8]]
if player.order10 < 16:
player.name10 = Name1[y[9]]
if player.order10 > 15:
player.name10 = Name2[y[9]]
if player.order11 < 16:
player.name11 = Name1[y[10]]
if player.order11 > 15:
player.name11 = Name2[y[10]]
if player.order12 < 16:
player.name12 = Name1[y[11]]
if player.order12 > 15:
player.name12 = Name2[y[11]]
if player.order13 < 16:
player.name13 = Name1[y[12]]
if player.order13 > 15:
player.name13 = Name2[y[12]]
if player.order14 < 16:
player.name14 = Name1[y[13]]
if player.order14 > 15:
player.name14 = Name2[y[13]]
if player.order15 < 16:
player.name15 = Name1[y[14]]
if player.order15 > 15:
player.name15 = Name2[y[14]]
if player.order16 < 16:
player.name16 = Name1[y[15]]
if player.order16 > 15:
player.name16 = Name2[y[15]]
if player.order17 < 16:
player.name17 = Name1[y[16]]
if player.order17 > 15:
player.name17 = Name2[y[16]]
if player.order18 < 16:
player.name18 = Name1[y[17]]
if player.order18 > 15:
player.name18 = Name2[y[17]]
if player.order19 < 16:
player.name19 = Name1[y[18]]
if player.order19 > 15:
player.name19 = Name2[y[18]]
if player.order20 < 16:
player.name20 = Name1[y[19]]
if player.order20 > 15:
player.name20 = Name2[y[19]]
if player.order21 < 16:
player.name21 = Name1[y[20]]
if player.order21 > 15:
player.name21 = Name2[y[20]]
if player.order22 < 16:
player.name22 = Name1[y[21]]
if player.order22 > 15:
player.name22 = Name2[y[21]]
if player.order23 < 16:
player.name23 = Name1[y[22]]
if player.order23 > 15:
player.name23 = Name2[y[22]]
if player.order24 < 16:
player.name24 = Name1[y[23]]
if player.order24 > 15:
player.name24 = Name2[y[23]]
if player.order25 < 16:
player.name25 = Name1[y[24]]
if player.order25 > 15:
player.name25 = Name2[y[24]]
if player.order26 < 16:
player.name26 = Name1[y[25]]
if player.order26 > 15:
player.name26 = Name2[y[25]]
if player.order27 < 16:
player.name27 = Name1[y[26]]
if player.order27 > 15:
player.name27 = Name2[y[26]]
if player.order28 < 16:
player.name28 = Name1[y[27]]
if player.order28 > 15:
player.name28 = Name2[y[27]]
if player.order29 < 16:
player.name29 = Name1[y[28]]
if player.order29 > 15:
player.name29 = Name2[y[28]]
if player.order30 < 16:
player.name30 = Name1[y[29]]
if player.order30 > 15:
player.name30 = Name2[y[29]]
if player.participant.id_in_session < 319:
if player.participant.id_in_session > 198:
y1 = list(range(0, 30)) # For each [race, sex] 0....29
random.shuffle(y1)
y2 = list(range(0, 30)) # For each [race, sex] 0....29
random.shuffle(y2)
y3 = list(range(0, 30)) # For each [race, sex] 0....29
random.shuffle(y3)
y4 = list(range(0, 30)) # For each [race, sex] 0....29
random.shuffle(y4)
y5 = list(range(0, 30)) # For each [race, sex] 0....29
random.shuffle(y5)
y6 = list(range(0, 30)) # For each [race, sex] 0....29
random.shuffle(y6)
name_tmp = [C.Name_All[0][y1[0]], C.Name_All[0][y1[1]], C.Name_All[0][y1[2]], C.Name_All[0][y1[3]],
C.Name_All[0][y1[4]], C.Name_All[0][y1[5]],
C.Name_All[1][y2[0]], C.Name_All[1][y2[1]], C.Name_All[1][y2[2]], C.Name_All[1][y2[3]],
C.Name_All[1][y2[4]], C.Name_All[1][y2[5]],
C.Name_All[2][y3[0]], C.Name_All[2][y3[1]], C.Name_All[2][y3[2]], C.Name_All[2][y3[3]],
C.Name_All[2][y3[4]], C.Name_All[2][y3[5]],
C.Name_All[3][y4[0]], C.Name_All[3][y4[1]], C.Name_All[3][y4[2]], C.Name_All[3][y4[3]],
C.Name_All[3][y4[4]], C.Name_All[3][y4[5]],
C.Name_All[4][y5[0]], C.Name_All[4][y5[1]], C.Name_All[4][y5[2]], C.Name_All[4][y5[3]],
C.Name_All[4][y5[4]], C.Name_All[4][y5[5]],
C.Name_All[5][y6[0]], C.Name_All[5][y6[1]], C.Name_All[5][y6[2]], C.Name_All[5][y6[3]],
C.Name_All[5][y6[4]], C.Name_All[5][y6[5]]]
random.shuffle(name_tmp)
player.name1 = name_tmp[0]
player.name2 = name_tmp[1]
player.name3 = name_tmp[2]
player.name4 = name_tmp[3]
player.name5 = name_tmp[4]
player.name6 = name_tmp[5]
player.name7 = name_tmp[6]
player.name8 = name_tmp[7]
player.name9 = name_tmp[8]
player.name10 = name_tmp[9]
player.name11 = name_tmp[10]
player.name12 = name_tmp[11]
player.name13 = name_tmp[12]
player.name14 = name_tmp[13]
player.name15 = name_tmp[14]
player.name16 = name_tmp[15]
player.name17 = name_tmp[16]
player.name18 = name_tmp[17]
player.name19 = name_tmp[18]
player.name20 = name_tmp[19]
player.name21 = name_tmp[20]
player.name22 = name_tmp[21]
player.name23 = name_tmp[22]
player.name24 = name_tmp[23]
player.name25 = name_tmp[24]
player.name26 = name_tmp[25]
player.name27 = name_tmp[26]
player.name28 = name_tmp[27]
player.name29 = name_tmp[28]
player.name30 = name_tmp[29]
if player.participant.id_in_session > 318:
player.name1 = 'Applicant 1'
player.name2 = 'Applicant 2'
player.name3 = 'Applicant 3'
player.name4 = 'Applicant 4'
player.name5 = 'Applicant 5'
player.name6 = 'Applicant 6'
player.name7 = 'Applicant 7'
player.name8 = 'Applicant 8'
player.name9 = 'Applicant 9'
player.name10 = 'Applicant 10'
player.name11 = 'Applicant 11'
player.name12 = 'Applicant 12'
player.name13 = 'Applicant 13'
player.name14 = 'Applicant 14'
player.name15 = 'Applicant 15'
player.name16 = 'Applicant 16'
player.name17 = 'Applicant 17'
player.name18 = 'Applicant 18'
player.name19 = 'Applicant 19'
player.name20 = 'Applicant 20'
player.name21 = 'Applicant 21'
player.name22 = 'Applicant 22'
player.name23 = 'Applicant 23'
player.name24 = 'Applicant 24'
player.name25 = 'Applicant 25'
player.name26 = 'Applicant 26'
player.name27 = 'Applicant 27'
player.name28 = 'Applicant 28'
player.name29 = 'Applicant 29'
player.name30 = 'Applicant 30'
class Inst1(Page):
def vars_for_template(player):
return dict(
n1=player.name1,
n2=player.name2,
n3=player.name3,
n4=player.name4,
n5=player.name5,
n6=player.name6,
n7=player.name7,
n8=player.name8,
n9=player.name9,
n10=player.name10,
n11=player.name11,
n12=player.name12,
n13=player.name13,
n14=player.name14,
n15=player.name15,
n16=player.name16,
n17=player.name17,
n18=player.name18,
n19=player.name19,
n20=player.name20,
n21=player.name21,
n22=player.name22,
n23=player.name23,
n24=player.name24,
n25=player.name25,
n26=player.name26,
n27=player.name27,
n28=player.name28,
n29=player.name29,
n30=player.name30
)
class Inst2(Page):
pass
class CV1(Page):
form_model = 'player'
form_fields = ['cog_1', 'game1_1', 'game1amount_1', 'game2_1', 'game2amount_1',
'game3_1', 'game3amount_1', 'game4_1', 'game4amount_1',
'combG_1', 'combI_1']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name1,
multi=C.Profile[player.order1-1][0],
BoSid=C.Profile[player.order1-1][2],
BoSno=C.Profile[player.order1-1][3],
PDid=C.Profile[player.order1-1][5],
PDno=C.Profile[player.order1-1][6],
Ultid=C.Profile[player.order1-1][8],
Ultno=C.Profile[player.order1-1][9],
Pubid=C.Profile[player.order1-1][11],
Pubno=C.Profile[player.order1-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==1:
player.payname=player.name1
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order1-1][1] - player.cog_1)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05*tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order1-1][4] - C.Profile[player.order1-1][3]
if player.game1_1 == 1:
tmp2 = abs(player.game1amount_1)
elif player.game1_1 == 2:
tmp2 = -abs(player.game1amount_1)
elif player.game1_1 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order1-1][7] - C.Profile[player.order1-1][6]
if player.game2_1 == 1:
tmp2 = abs(player.game2amount_1)
elif player.game2_1 == 2:
tmp2 = -abs(player.game2amount_1)
elif player.game2_1 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order1-1][10] - C.Profile[player.order1-1][9]
if player.game3_1 == 1:
tmp2 = abs(player.game3amount_1)
elif player.game3_1 == 2:
tmp2 = -abs(player.game3amount_1)
elif player.game3_1 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order1-1][13] - C.Profile[player.order1-1][12]
if player.game4_1 == 1:
tmp2 = abs(player.game3amount_1)
elif player.game4_1 == 2:
tmp2 = -abs(player.game3amount_1)
elif player.game4_1 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order1-1][14] - player.combG_1)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order1-1][15] - player.combI_1)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV2(Page):
form_model = 'player'
form_fields = ['cog_2', 'game1_2', 'game1amount_2', 'game2_2', 'game2amount_2',
'game3_2', 'game3amount_2', 'game4_2', 'game4amount_2',
'combG_2', 'combI_2']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name2,
multi=C.Profile[player.order2-1][0],
BoSid=C.Profile[player.order2-1][2],
BoSno=C.Profile[player.order2-1][3],
PDid=C.Profile[player.order2-1][5],
PDno=C.Profile[player.order2-1][6],
Ultid=C.Profile[player.order2-1][8],
Ultno=C.Profile[player.order2-1][9],
Pubid=C.Profile[player.order2-1][11],
Pubno=C.Profile[player.order2-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==2:
player.payname=player.name2
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order2-1][1] - player.cog_2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order2-1][4] - C.Profile[player.order2-1][3]
if player.game1_2 == 1:
tmp2 = abs(player.game1amount_2)
elif player.game1_2 == 2:
tmp2 = -abs(player.game1amount_2)
elif player.game1_2 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order2-1][7] - C.Profile[player.order2-1][6]
if player.game2_2 == 1:
tmp2 = abs(player.game2amount_2)
elif player.game2_2 == 2:
tmp2 = -abs(player.game2amount_2)
elif player.game2_2 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order2-1][10] - C.Profile[player.order2-1][9]
if player.game3_2 == 1:
tmp2 = abs(player.game3amount_2)
elif player.game3_2 == 2:
tmp2 = -abs(player.game3amount_2)
elif player.game3_2 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order2-1][13] - C.Profile[player.order2-1][12]
if player.game4_2 == 1:
tmp2 = abs(player.game3amount_2)
elif player.game4_2 == 2:
tmp2 = -abs(player.game3amount_2)
elif player.game4_2 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order2-1][14] - player.combG_2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order2-1][15] - player.combI_2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV3(Page):
form_model = 'player'
form_fields = ['cog_3', 'game1_3', 'game1amount_3', 'game2_3', 'game2amount_3',
'game3_3', 'game3amount_3', 'game4_3', 'game4amount_3',
'combG_3', 'combI_3']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name3,
multi=C.Profile[player.order3-1][0],
BoSid=C.Profile[player.order3-1][2],
BoSno=C.Profile[player.order3-1][3],
PDid=C.Profile[player.order3-1][5],
PDno=C.Profile[player.order3-1][6],
Ultid=C.Profile[player.order3-1][8],
Ultno=C.Profile[player.order3-1][9],
Pubid=C.Profile[player.order3-1][11],
Pubno=C.Profile[player.order3-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==3:
player.payname=player.name3
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order3-1][1] - player.cog_3)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order3-1][4] - C.Profile[player.order3-1][3]
if player.game1_3 == 1:
tmp2 = abs(player.game1amount_3)
elif player.game1_3 == 2:
tmp2 = -abs(player.game1amount_3)
elif player.game1_3 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order3-1][7] - C.Profile[player.order3-1][6]
if player.game2_3 == 1:
tmp2 = abs(player.game2amount_3)
elif player.game2_3 == 2:
tmp2 = -abs(player.game2amount_3)
elif player.game2_3 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order3-1][10] - C.Profile[player.order3-1][9]
if player.game3_3 == 1:
tmp2 = abs(player.game3amount_3)
elif player.game3_3 == 2:
tmp2 = -abs(player.game3amount_3)
elif player.game3_3 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order3-1][13] - C.Profile[player.order3-1][12]
if player.game4_3 == 1:
tmp2 = abs(player.game3amount_3)
elif player.game4_3 == 2:
tmp2 = -abs(player.game3amount_3)
elif player.game4_3 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order3-1][14] - player.combG_3)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order3-1][15] - player.combI_3)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV4(Page):
form_model = 'player'
form_fields = ['cog_4', 'game1_4', 'game1amount_4', 'game2_4', 'game2amount_4',
'game3_4', 'game3amount_4', 'game4_4', 'game4amount_4',
'combG_4', 'combI_4']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name4,
multi=C.Profile[player.order4-1][0],
BoSid=C.Profile[player.order4-1][2],
BoSno=C.Profile[player.order4-1][3],
PDid=C.Profile[player.order4-1][5],
PDno=C.Profile[player.order4-1][6],
Ultid=C.Profile[player.order4-1][8],
Ultno=C.Profile[player.order4-1][9],
Pubid=C.Profile[player.order4-1][11],
Pubno=C.Profile[player.order4-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==4:
player.payname=player.name4
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order4-1][1] - player.cog_4)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order4-1][4] - C.Profile[player.order4-1][3]
if player.game1_4 == 1:
tmp2 = abs(player.game1amount_4)
elif player.game1_4 == 2:
tmp2 = -abs(player.game1amount_4)
elif player.game1_4 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order4-1][7] - C.Profile[player.order4-1][6]
if player.game2_4 == 1:
tmp2 = abs(player.game2amount_4)
elif player.game2_4 == 2:
tmp2 = -abs(player.game2amount_4)
elif player.game2_4 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order4-1][10] - C.Profile[player.order4-1][9]
if player.game3_4 == 1:
tmp2 = abs(player.game3amount_4)
elif player.game3_4 == 2:
tmp2 = -abs(player.game3amount_4)
elif player.game3_4 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order4-1][13] - C.Profile[player.order4-1][12]
if player.game4_4 == 1:
tmp2 = abs(player.game3amount_4)
elif player.game4_4 == 2:
tmp2 = -abs(player.game3amount_4)
elif player.game4_4 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order4-1][14] - player.combG_4)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order4-1][15] - player.combI_4)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV5(Page):
form_model = 'player'
form_fields = ['cog_5', 'game1_5', 'game1amount_5', 'game2_5', 'game2amount_5',
'game3_5', 'game3amount_5', 'game4_5', 'game4amount_5',
'combG_5', 'combI_5']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name5,
multi=C.Profile[player.order5-1][0],
BoSid=C.Profile[player.order5-1][2],
BoSno=C.Profile[player.order5-1][3],
PDid=C.Profile[player.order5-1][5],
PDno=C.Profile[player.order5-1][6],
Ultid=C.Profile[player.order5-1][8],
Ultno=C.Profile[player.order5-1][9],
Pubid=C.Profile[player.order5-1][11],
Pubno=C.Profile[player.order5-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==5:
player.payname=player.name5
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order5-1][1] - player.cog_5)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order5-1][4] - C.Profile[player.order5-1][3]
if player.game1_5 == 1:
tmp2 = abs(player.game1amount_5)
elif player.game1_5 == 2:
tmp2 = -abs(player.game1amount_5)
elif player.game1_5 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order5-1][7] - C.Profile[player.order5-1][6]
if player.game2_5 == 1:
tmp2 = abs(player.game2amount_5)
elif player.game2_5 == 2:
tmp2 = -abs(player.game2amount_5)
elif player.game2_5 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order5-1][10] - C.Profile[player.order5-1][9]
if player.game3_5 == 1:
tmp2 = abs(player.game3amount_5)
elif player.game3_5 == 2:
tmp2 = -abs(player.game3amount_5)
elif player.game3_5 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order5-1][13] - C.Profile[player.order5-1][12]
if player.game4_5 == 1:
tmp2 = abs(player.game3amount_5)
elif player.game4_5 == 2:
tmp2 = -abs(player.game3amount_5)
elif player.game4_5 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order5-1][14] - player.combG_5)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order5-1][15] - player.combI_5)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV6(Page):
form_model = 'player'
form_fields = ['cog_6', 'game1_6', 'game1amount_6', 'game2_6', 'game2amount_6',
'game3_6', 'game3amount_6', 'game4_6', 'game4amount_6',
'combG_6', 'combI_6']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name6,
multi=C.Profile[player.order6-1][0],
BoSid=C.Profile[player.order6-1][2],
BoSno=C.Profile[player.order6-1][3],
PDid=C.Profile[player.order6-1][5],
PDno=C.Profile[player.order6-1][6],
Ultid=C.Profile[player.order6-1][8],
Ultno=C.Profile[player.order6-1][9],
Pubid=C.Profile[player.order6-1][11],
Pubno=C.Profile[player.order6-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==6:
player.payname=player.name6
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order6-1][1] - player.cog_6)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order6-1][4] - C.Profile[player.order6-1][3]
if player.game1_6 == 1:
tmp2 = abs(player.game1amount_6)
elif player.game1_6 == 2:
tmp2 = -abs(player.game1amount_6)
elif player.game1_6 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order6-1][7] - C.Profile[player.order6-1][6]
if player.game2_6 == 1:
tmp2 = abs(player.game2amount_6)
elif player.game2_6 == 2:
tmp2 = -abs(player.game2amount_6)
elif player.game2_6 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order6-1][10] - C.Profile[player.order6-1][9]
if player.game3_6 == 1:
tmp2 = abs(player.game3amount_6)
elif player.game3_6 == 2:
tmp2 = -abs(player.game3amount_6)
elif player.game3_6 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order6-1][13] - C.Profile[player.order6-1][12]
if player.game4_6 == 1:
tmp2 = abs(player.game3amount_6)
elif player.game4_6 == 2:
tmp2 = -abs(player.game3amount_6)
elif player.game4_6 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order6-1][14] - player.combG_6)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order6-1][15] - player.combI_6)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV7(Page):
form_model = 'player'
form_fields = ['cog_7', 'game1_7', 'game1amount_7', 'game2_7', 'game2amount_7',
'game3_7', 'game3amount_7', 'game4_7', 'game4amount_7',
'combG_7', 'combI_7']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name7,
multi=C.Profile[player.order7-1][0],
BoSid=C.Profile[player.order7-1][2],
BoSno=C.Profile[player.order7-1][3],
PDid=C.Profile[player.order7-1][5],
PDno=C.Profile[player.order7-1][6],
Ultid=C.Profile[player.order7-1][8],
Ultno=C.Profile[player.order7-1][9],
Pubid=C.Profile[player.order7-1][11],
Pubno=C.Profile[player.order7-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==7:
player.payname=player.name7
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order7-1][1] - player.cog_7)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order7-1][4] - C.Profile[player.order7-1][3]
if player.game1_7 == 1:
tmp2 = abs(player.game1amount_7)
elif player.game1_7 == 2:
tmp2 = -abs(player.game1amount_7)
elif player.game1_7 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order7-1][7] - C.Profile[player.order7-1][6]
if player.game2_7 == 1:
tmp2 = abs(player.game2amount_7)
elif player.game2_7 == 2:
tmp2 = -abs(player.game2amount_7)
elif player.game2_7 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order7-1][10] - C.Profile[player.order7-1][9]
if player.game3_7 == 1:
tmp2 = abs(player.game3amount_7)
elif player.game3_7 == 2:
tmp2 = -abs(player.game3amount_7)
elif player.game3_7 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order7-1][13] - C.Profile[player.order7-1][12]
if player.game4_7 == 1:
tmp2 = abs(player.game3amount_7)
elif player.game4_7 == 2:
tmp2 = -abs(player.game3amount_7)
elif player.game4_7 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order7-1][14] - player.combG_7)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order7-1][15] - player.combI_7)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV8(Page):
form_model = 'player'
form_fields = ['cog_8', 'game1_8', 'game1amount_8', 'game2_8', 'game2amount_8',
'game3_8', 'game3amount_8', 'game4_8', 'game4amount_8',
'combG_8', 'combI_8']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name8,
multi=C.Profile[player.order8-1][0],
BoSid=C.Profile[player.order8-1][2],
BoSno=C.Profile[player.order8-1][3],
PDid=C.Profile[player.order8-1][5],
PDno=C.Profile[player.order8-1][6],
Ultid=C.Profile[player.order8-1][8],
Ultno=C.Profile[player.order8-1][9],
Pubid=C.Profile[player.order8-1][11],
Pubno=C.Profile[player.order8-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==8:
player.payname=player.name8
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order8-1][1] - player.cog_8)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order8-1][4] - C.Profile[player.order8-1][3]
if player.game1_8 == 1:
tmp2 = abs(player.game1amount_8)
elif player.game1_8 == 2:
tmp2 = -abs(player.game1amount_8)
elif player.game1_8 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order8-1][7] - C.Profile[player.order8-1][6]
if player.game2_8 == 1:
tmp2 = abs(player.game2amount_8)
elif player.game2_8 == 2:
tmp2 = -abs(player.game2amount_8)
elif player.game2_8 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order8-1][10] - C.Profile[player.order8-1][9]
if player.game3_8 == 1:
tmp2 = abs(player.game3amount_8)
elif player.game3_8 == 2:
tmp2 = -abs(player.game3amount_8)
elif player.game3_8 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order8-1][13] - C.Profile[player.order8-1][12]
if player.game4_8 == 1:
tmp2 = abs(player.game3amount_8)
elif player.game4_8 == 2:
tmp2 = -abs(player.game3amount_8)
elif player.game4_8 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order8-1][14] - player.combG_8)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order8-1][15] - player.combI_8)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV9(Page):
form_model = 'player'
form_fields = ['cog_9', 'game1_9', 'game1amount_9', 'game2_9', 'game2amount_9',
'game3_9', 'game3amount_9', 'game4_9', 'game4amount_9',
'combG_9', 'combI_9']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name9,
multi=C.Profile[player.order9-1][0],
BoSid=C.Profile[player.order9-1][2],
BoSno=C.Profile[player.order9-1][3],
PDid=C.Profile[player.order9-1][5],
PDno=C.Profile[player.order9-1][6],
Ultid=C.Profile[player.order9-1][8],
Ultno=C.Profile[player.order9-1][9],
Pubid=C.Profile[player.order9-1][11],
Pubno=C.Profile[player.order9-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==9:
player.payname=player.name9
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order9-1][1] - player.cog_9)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order9-1][4] - C.Profile[player.order9-1][3]
if player.game1_9 == 1:
tmp2 = abs(player.game1amount_9)
elif player.game1_9 == 2:
tmp2 = -abs(player.game1amount_9)
elif player.game1_9 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order9-1][7] - C.Profile[player.order9-1][6]
if player.game2_9 == 1:
tmp2 = abs(player.game2amount_9)
elif player.game2_9 == 2:
tmp2 = -abs(player.game2amount_9)
elif player.game2_9 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order9-1][10] - C.Profile[player.order9-1][9]
if player.game3_9 == 1:
tmp2 = abs(player.game3amount_9)
elif player.game3_9 == 2:
tmp2 = -abs(player.game3amount_9)
elif player.game3_9 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order9-1][13] - C.Profile[player.order9-1][12]
if player.game4_9 == 1:
tmp2 = abs(player.game3amount_9)
elif player.game4_9 == 2:
tmp2 = -abs(player.game3amount_9)
elif player.game4_9 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order9-1][14] - player.combG_9)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order9-1][15] - player.combI_9)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV10(Page):
form_model = 'player'
form_fields = ['cog_10', 'game1_10', 'game1amount_10', 'game2_10', 'game2amount_10',
'game3_10', 'game3amount_10', 'game4_10', 'game4amount_10',
'combG_10', 'combI_10']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name10,
multi=C.Profile[player.order10-1][0],
BoSid=C.Profile[player.order10-1][2],
BoSno=C.Profile[player.order10-1][3],
PDid=C.Profile[player.order10-1][5],
PDno=C.Profile[player.order10-1][6],
Ultid=C.Profile[player.order10-1][8],
Ultno=C.Profile[player.order10-1][9],
Pubid=C.Profile[player.order10-1][11],
Pubno=C.Profile[player.order10-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==10:
player.payname=player.name10
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order10-1][1] - player.cog_10)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order10-1][4] - C.Profile[player.order10-1][3]
if player.game1_10 == 1:
tmp2 = abs(player.game1amount_10)
elif player.game1_10 == 2:
tmp2 = -abs(player.game1amount_10)
elif player.game1_10 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order10-1][7] - C.Profile[player.order10-1][6]
if player.game2_10 == 1:
tmp2 = abs(player.game2amount_10)
elif player.game2_10 == 2:
tmp2 = -abs(player.game2amount_10)
elif player.game2_10 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order10-1][10] - C.Profile[player.order10-1][9]
if player.game3_10 == 1:
tmp2 = abs(player.game3amount_10)
elif player.game3_10 == 2:
tmp2 = -abs(player.game3amount_10)
elif player.game3_10 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order10-1][13] - C.Profile[player.order10-1][12]
if player.game4_10 == 1:
tmp2 = abs(player.game3amount_10)
elif player.game4_10 == 2:
tmp2 = -abs(player.game3amount_10)
elif player.game4_10 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order10-1][14] - player.combG_10)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order10-1][15] - player.combI_10)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV11(Page):
form_model = 'player'
form_fields = ['cog_11', 'game1_11', 'game1amount_11', 'game2_11', 'game2amount_11',
'game3_11', 'game3amount_11', 'game4_11', 'game4amount_11',
'combG_11', 'combI_11']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name11,
multi=C.Profile[player.order11-1][0],
BoSid=C.Profile[player.order11-1][2],
BoSno=C.Profile[player.order11-1][3],
PDid=C.Profile[player.order11-1][5],
PDno=C.Profile[player.order11-1][6],
Ultid=C.Profile[player.order11-1][8],
Ultno=C.Profile[player.order11-1][9],
Pubid=C.Profile[player.order11-1][11],
Pubno=C.Profile[player.order11-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==11:
player.payname=player.name11
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order11-1][1] - player.cog_11)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05*tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order11-1][4] - C.Profile[player.order11-1][3]
if player.game1_11 == 1:
tmp2 = abs(player.game1amount_11)
elif player.game1_11 == 2:
tmp2 = -abs(player.game1amount_11)
elif player.game1_11 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order11-1][7] - C.Profile[player.order11-1][6]
if player.game2_11 == 1:
tmp2 = abs(player.game2amount_11)
elif player.game2_11 == 2:
tmp2 = -abs(player.game2amount_11)
elif player.game2_11 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order11-1][10] - C.Profile[player.order11-1][9]
if player.game3_11 == 1:
tmp2 = abs(player.game3amount_11)
elif player.game3_11 == 2:
tmp2 = -abs(player.game3amount_11)
elif player.game3_11 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order11-1][13] - C.Profile[player.order11-1][12]
if player.game4_11 == 1:
tmp2 = abs(player.game3amount_11)
elif player.game4_11 == 2:
tmp2 = -abs(player.game3amount_11)
elif player.game4_11 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order11-1][14] - player.combG_11)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order11-1][15] - player.combI_11)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV12(Page):
form_model = 'player'
form_fields = ['cog_12', 'game1_12', 'game1amount_12', 'game2_12', 'game2amount_12',
'game3_12', 'game3amount_12', 'game4_12', 'game4amount_12',
'combG_12', 'combI_12']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name12,
multi=C.Profile[player.order12-1][0],
BoSid=C.Profile[player.order12-1][2],
BoSno=C.Profile[player.order12-1][3],
PDid=C.Profile[player.order12-1][5],
PDno=C.Profile[player.order12-1][6],
Ultid=C.Profile[player.order12-1][8],
Ultno=C.Profile[player.order12-1][9],
Pubid=C.Profile[player.order12-1][11],
Pubno=C.Profile[player.order12-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==12:
player.payname=player.name12
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order12-1][1] - player.cog_12)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order12-1][4] - C.Profile[player.order12-1][3]
if player.game1_12 == 1:
tmp2 = abs(player.game1amount_12)
elif player.game1_12 == 2:
tmp2 = -abs(player.game1amount_12)
elif player.game1_12 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order12-1][7] - C.Profile[player.order12-1][6]
if player.game2_12 == 1:
tmp2 = abs(player.game2amount_12)
elif player.game2_12 == 2:
tmp2 = -abs(player.game2amount_12)
elif player.game2_12 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order12-1][10] - C.Profile[player.order12-1][9]
if player.game3_12 == 1:
tmp2 = abs(player.game3amount_12)
elif player.game3_12 == 2:
tmp2 = -abs(player.game3amount_12)
elif player.game3_12 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order12-1][13] - C.Profile[player.order12-1][12]
if player.game4_12 == 1:
tmp2 = abs(player.game3amount_12)
elif player.game4_12 == 2:
tmp2 = -abs(player.game3amount_12)
elif player.game4_12 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order12-1][14] - player.combG_12)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order12-1][15] - player.combI_12)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV13(Page):
form_model = 'player'
form_fields = ['cog_13', 'game1_13', 'game1amount_13', 'game2_13', 'game2amount_13',
'game3_13', 'game3amount_13', 'game4_13', 'game4amount_13',
'combG_13', 'combI_13']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name13,
multi=C.Profile[player.order13-1][0],
BoSid=C.Profile[player.order13-1][2],
BoSno=C.Profile[player.order13-1][3],
PDid=C.Profile[player.order13-1][5],
PDno=C.Profile[player.order13-1][6],
Ultid=C.Profile[player.order13-1][8],
Ultno=C.Profile[player.order13-1][9],
Pubid=C.Profile[player.order13-1][11],
Pubno=C.Profile[player.order13-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==13:
player.payname=player.name13
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order13-1][1] - player.cog_13)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order13-1][4] - C.Profile[player.order13-1][3]
if player.game1_13 == 1:
tmp2 = abs(player.game1amount_13)
elif player.game1_13 == 2:
tmp2 = -abs(player.game1amount_13)
elif player.game1_13 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order13-1][7] - C.Profile[player.order13-1][6]
if player.game2_13 == 1:
tmp2 = abs(player.game2amount_13)
elif player.game2_13 == 2:
tmp2 = -abs(player.game2amount_13)
elif player.game2_13 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order13-1][10] - C.Profile[player.order13-1][9]
if player.game3_13 == 1:
tmp2 = abs(player.game3amount_13)
elif player.game3_13 == 2:
tmp2 = -abs(player.game3amount_13)
elif player.game3_13 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order13-1][13] - C.Profile[player.order13-1][12]
if player.game4_13 == 1:
tmp2 = abs(player.game3amount_13)
elif player.game4_13 == 2:
tmp2 = -abs(player.game3amount_13)
elif player.game4_13 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order13-1][14] - player.combG_13)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order13-1][15] - player.combI_13)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV14(Page):
form_model = 'player'
form_fields = ['cog_14', 'game1_14', 'game1amount_14', 'game2_14', 'game2amount_14',
'game3_14', 'game3amount_14', 'game4_14', 'game4amount_14',
'combG_14', 'combI_14']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name14,
multi=C.Profile[player.order14-1][0],
BoSid=C.Profile[player.order14-1][2],
BoSno=C.Profile[player.order14-1][3],
PDid=C.Profile[player.order14-1][5],
PDno=C.Profile[player.order14-1][6],
Ultid=C.Profile[player.order14-1][8],
Ultno=C.Profile[player.order14-1][9],
Pubid=C.Profile[player.order14-1][11],
Pubno=C.Profile[player.order14-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==14:
player.payname=player.name14
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order14-1][1] - player.cog_14)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order14-1][4] - C.Profile[player.order14-1][3]
if player.game1_14 == 1:
tmp2 = abs(player.game1amount_14)
elif player.game1_14 == 2:
tmp2 = -abs(player.game1amount_14)
elif player.game1_14 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order14-1][7] - C.Profile[player.order14-1][6]
if player.game2_14 == 1:
tmp2 = abs(player.game2amount_14)
elif player.game2_14 == 2:
tmp2 = -abs(player.game2amount_14)
elif player.game2_14 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order14-1][10] - C.Profile[player.order14-1][9]
if player.game3_14 == 1:
tmp2 = abs(player.game3amount_14)
elif player.game3_14 == 2:
tmp2 = -abs(player.game3amount_14)
elif player.game3_14 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order14-1][13] - C.Profile[player.order14-1][12]
if player.game4_14 == 1:
tmp2 = abs(player.game3amount_14)
elif player.game4_14 == 2:
tmp2 = -abs(player.game3amount_14)
elif player.game4_14 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order14-1][14] - player.combG_14)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order14-1][15] - player.combI_14)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV15(Page):
form_model = 'player'
form_fields = ['cog_15', 'game1_15', 'game1amount_15', 'game2_15', 'game2amount_15',
'game3_15', 'game3amount_15', 'game4_15', 'game4amount_15',
'combG_15', 'combI_15']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name15,
multi=C.Profile[player.order15-1][0],
BoSid=C.Profile[player.order15-1][2],
BoSno=C.Profile[player.order15-1][3],
PDid=C.Profile[player.order15-1][5],
PDno=C.Profile[player.order15-1][6],
Ultid=C.Profile[player.order15-1][8],
Ultno=C.Profile[player.order15-1][9],
Pubid=C.Profile[player.order15-1][11],
Pubno=C.Profile[player.order15-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==15:
player.payname=player.name15
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order15-1][1] - player.cog_15)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order15-1][4] - C.Profile[player.order15-1][3]
if player.game1_15 == 1:
tmp2 = abs(player.game1amount_15)
elif player.game1_15 == 2:
tmp2 = -abs(player.game1amount_15)
elif player.game1_15 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order15-1][7] - C.Profile[player.order15-1][6]
if player.game2_15 == 1:
tmp2 = abs(player.game2amount_15)
elif player.game2_15 == 2:
tmp2 = -abs(player.game2amount_15)
elif player.game2_15 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order15-1][10] - C.Profile[player.order15-1][9]
if player.game3_15 == 1:
tmp2 = abs(player.game3amount_15)
elif player.game3_15 == 2:
tmp2 = -abs(player.game3amount_15)
elif player.game3_15 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order15-1][13] - C.Profile[player.order15-1][12]
if player.game4_15 == 1:
tmp2 = abs(player.game3amount_15)
elif player.game4_15 == 2:
tmp2 = -abs(player.game3amount_15)
elif player.game4_15 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order15-1][14] - player.combG_15)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order15-1][15] - player.combI_15)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV16(Page):
form_model = 'player'
form_fields = ['cog_16', 'game1_16', 'game1amount_16', 'game2_16', 'game2amount_16',
'game3_16', 'game3amount_16', 'game4_16', 'game4amount_16',
'combG_16', 'combI_16']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name16,
multi=C.Profile[player.order16-1][0],
BoSid=C.Profile[player.order16-1][2],
BoSno=C.Profile[player.order16-1][3],
PDid=C.Profile[player.order16-1][5],
PDno=C.Profile[player.order16-1][6],
Ultid=C.Profile[player.order16-1][8],
Ultno=C.Profile[player.order16-1][9],
Pubid=C.Profile[player.order16-1][11],
Pubno=C.Profile[player.order16-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==16:
player.payname=player.name16
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order16-1][1] - player.cog_16)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order16-1][4] - C.Profile[player.order16-1][3]
if player.game1_16 == 1:
tmp2 = abs(player.game1amount_16)
elif player.game1_16 == 2:
tmp2 = -abs(player.game1amount_16)
elif player.game1_16 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order16-1][7] - C.Profile[player.order16-1][6]
if player.game2_16 == 1:
tmp2 = abs(player.game2amount_16)
elif player.game2_16 == 2:
tmp2 = -abs(player.game2amount_16)
elif player.game2_16 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order16-1][10] - C.Profile[player.order16-1][9]
if player.game3_16 == 1:
tmp2 = abs(player.game3amount_16)
elif player.game3_16 == 2:
tmp2 = -abs(player.game3amount_16)
elif player.game3_16 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order16-1][13] - C.Profile[player.order16-1][12]
if player.game4_16 == 1:
tmp2 = abs(player.game3amount_16)
elif player.game4_16 == 2:
tmp2 = -abs(player.game3amount_16)
elif player.game4_16 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order16-1][14] - player.combG_16)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order16-1][15] - player.combI_16)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV17(Page):
form_model = 'player'
form_fields = ['cog_17', 'game1_17', 'game1amount_17', 'game2_17', 'game2amount_17',
'game3_17', 'game3amount_17', 'game4_17', 'game4amount_17',
'combG_17', 'combI_17']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name17,
multi=C.Profile[player.order17-1][0],
BoSid=C.Profile[player.order17-1][2],
BoSno=C.Profile[player.order17-1][3],
PDid=C.Profile[player.order17-1][5],
PDno=C.Profile[player.order17-1][6],
Ultid=C.Profile[player.order17-1][8],
Ultno=C.Profile[player.order17-1][9],
Pubid=C.Profile[player.order17-1][11],
Pubno=C.Profile[player.order17-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==17:
player.payname=player.name17
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order17-1][1] - player.cog_17)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order17-1][4] - C.Profile[player.order17-1][3]
if player.game1_17 == 1:
tmp2 = abs(player.game1amount_17)
elif player.game1_17 == 2:
tmp2 = -abs(player.game1amount_17)
elif player.game1_17 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order17-1][7] - C.Profile[player.order17-1][6]
if player.game2_17 == 1:
tmp2 = abs(player.game2amount_17)
elif player.game2_17 == 2:
tmp2 = -abs(player.game2amount_17)
elif player.game2_17 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order17-1][10] - C.Profile[player.order17-1][9]
if player.game3_17 == 1:
tmp2 = abs(player.game3amount_17)
elif player.game3_17 == 2:
tmp2 = -abs(player.game3amount_17)
elif player.game3_17 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order17-1][13] - C.Profile[player.order17-1][12]
if player.game4_17 == 1:
tmp2 = abs(player.game3amount_17)
elif player.game4_17 == 2:
tmp2 = -abs(player.game3amount_17)
elif player.game4_17 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order17-1][14] - player.combG_17)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order17-1][15] - player.combI_17)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV18(Page):
form_model = 'player'
form_fields = ['cog_18', 'game1_18', 'game1amount_18', 'game2_18', 'game2amount_18',
'game3_18', 'game3amount_18', 'game4_18', 'game4amount_18',
'combG_18', 'combI_18']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name18,
multi=C.Profile[player.order18-1][0],
BoSid=C.Profile[player.order18-1][2],
BoSno=C.Profile[player.order18-1][3],
PDid=C.Profile[player.order18-1][5],
PDno=C.Profile[player.order18-1][6],
Ultid=C.Profile[player.order18-1][8],
Ultno=C.Profile[player.order18-1][9],
Pubid=C.Profile[player.order18-1][11],
Pubno=C.Profile[player.order18-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==18:
player.payname=player.name18
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order18-1][1] - player.cog_18)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order18-1][4] - C.Profile[player.order18-1][3]
if player.game1_18 == 1:
tmp2 = abs(player.game1amount_18)
elif player.game1_18 == 2:
tmp2 = -abs(player.game1amount_18)
elif player.game1_18 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order18-1][7] - C.Profile[player.order18-1][6]
if player.game2_18 == 1:
tmp2 = abs(player.game2amount_18)
elif player.game2_18 == 2:
tmp2 = -abs(player.game2amount_18)
elif player.game2_18 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order18-1][10] - C.Profile[player.order18-1][9]
if player.game3_18 == 1:
tmp2 = abs(player.game3amount_18)
elif player.game3_18 == 2:
tmp2 = -abs(player.game3amount_18)
elif player.game3_18 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order18-1][13] - C.Profile[player.order18-1][12]
if player.game4_18 == 1:
tmp2 = abs(player.game3amount_18)
elif player.game4_18 == 2:
tmp2 = -abs(player.game3amount_18)
elif player.game4_18 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order18-1][14] - player.combG_18)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order18-1][15] - player.combI_18)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV19(Page):
form_model = 'player'
form_fields = ['cog_19', 'game1_19', 'game1amount_19', 'game2_19', 'game2amount_19',
'game3_19', 'game3amount_19', 'game4_19', 'game4amount_19',
'combG_19', 'combI_19']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name19,
multi=C.Profile[player.order19-1][0],
BoSid=C.Profile[player.order19-1][2],
BoSno=C.Profile[player.order19-1][3],
PDid=C.Profile[player.order19-1][5],
PDno=C.Profile[player.order19-1][6],
Ultid=C.Profile[player.order19-1][8],
Ultno=C.Profile[player.order19-1][9],
Pubid=C.Profile[player.order19-1][11],
Pubno=C.Profile[player.order19-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==19:
player.payname=player.name19
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order19-1][1] - player.cog_19)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order19-1][4] - C.Profile[player.order19-1][3]
if player.game1_19 == 1:
tmp2 = abs(player.game1amount_19)
elif player.game1_19 == 2:
tmp2 = -abs(player.game1amount_19)
elif player.game1_19 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order19-1][7] - C.Profile[player.order19-1][6]
if player.game2_19 == 1:
tmp2 = abs(player.game2amount_19)
elif player.game2_19 == 2:
tmp2 = -abs(player.game2amount_19)
elif player.game2_19 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order19-1][10] - C.Profile[player.order19-1][9]
if player.game3_19 == 1:
tmp2 = abs(player.game3amount_19)
elif player.game3_19 == 2:
tmp2 = -abs(player.game3amount_19)
elif player.game3_19 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order19-1][13] - C.Profile[player.order19-1][12]
if player.game4_19 == 1:
tmp2 = abs(player.game3amount_19)
elif player.game4_19 == 2:
tmp2 = -abs(player.game3amount_19)
elif player.game4_19 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order19-1][14] - player.combG_19)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order19-1][15] - player.combI_19)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV20(Page):
form_model = 'player'
form_fields = ['cog_20', 'game1_20', 'game1amount_20', 'game2_20', 'game2amount_20',
'game3_20', 'game3amount_20', 'game4_20', 'game4amount_20',
'combG_20', 'combI_20']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name20,
multi=C.Profile[player.order20-1][0],
BoSid=C.Profile[player.order20-1][2],
BoSno=C.Profile[player.order20-1][3],
PDid=C.Profile[player.order20-1][5],
PDno=C.Profile[player.order20-1][6],
Ultid=C.Profile[player.order20-1][8],
Ultno=C.Profile[player.order20-1][9],
Pubid=C.Profile[player.order20-1][11],
Pubno=C.Profile[player.order20-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==20:
player.payname=player.name20
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order20-1][1] - player.cog_20)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order20-1][4] - C.Profile[player.order20-1][3]
if player.game1_20 == 1:
tmp2 = abs(player.game1amount_20)
elif player.game1_20 == 2:
tmp2 = -abs(player.game1amount_20)
elif player.game1_20 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order20-1][7] - C.Profile[player.order20-1][6]
if player.game2_20 == 1:
tmp2 = abs(player.game2amount_20)
elif player.game2_20 == 2:
tmp2 = -abs(player.game2amount_20)
elif player.game2_20 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order20-1][10] - C.Profile[player.order20-1][9]
if player.game3_20 == 1:
tmp2 = abs(player.game3amount_20)
elif player.game3_20 == 2:
tmp2 = -abs(player.game3amount_20)
elif player.game3_20 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order20-1][13] - C.Profile[player.order20-1][12]
if player.game4_20 == 1:
tmp2 = abs(player.game3amount_20)
elif player.game4_20 == 2:
tmp2 = -abs(player.game3amount_20)
elif player.game4_20 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order20-1][14] - player.combG_20)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order20-1][15] - player.combI_20)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV21(Page):
form_model = 'player'
form_fields = ['cog_21', 'game1_21', 'game1amount_21', 'game2_21', 'game2amount_21',
'game3_21', 'game3amount_21', 'game4_21', 'game4amount_21',
'combG_21', 'combI_21']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name21,
multi=C.Profile[player.order21-1][0],
BoSid=C.Profile[player.order21-1][2],
BoSno=C.Profile[player.order21-1][3],
PDid=C.Profile[player.order21-1][5],
PDno=C.Profile[player.order21-1][6],
Ultid=C.Profile[player.order21-1][8],
Ultno=C.Profile[player.order21-1][9],
Pubid=C.Profile[player.order21-1][11],
Pubno=C.Profile[player.order21-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==21:
player.payname=player.name21
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order21-1][1] - player.cog_21)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05*tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order21-1][4] - C.Profile[player.order21-1][3]
if player.game1_21 == 1:
tmp2 = abs(player.game1amount_21)
elif player.game1_21 == 2:
tmp2 = -abs(player.game1amount_21)
elif player.game1_21 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order21-1][7] - C.Profile[player.order21-1][6]
if player.game2_21 == 1:
tmp2 = abs(player.game2amount_21)
elif player.game2_21 == 2:
tmp2 = -abs(player.game2amount_21)
elif player.game2_21 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order21-1][10] - C.Profile[player.order21-1][9]
if player.game3_21 == 1:
tmp2 = abs(player.game3amount_21)
elif player.game3_21 == 2:
tmp2 = -abs(player.game3amount_21)
elif player.game3_21 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order21-1][13] - C.Profile[player.order21-1][12]
if player.game4_21 == 1:
tmp2 = abs(player.game3amount_21)
elif player.game4_21 == 2:
tmp2 = -abs(player.game3amount_21)
elif player.game4_21 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order21-1][14] - player.combG_21)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order21-1][15] - player.combI_21)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV22(Page):
form_model = 'player'
form_fields = ['cog_22', 'game1_22', 'game1amount_22', 'game2_22', 'game2amount_22',
'game3_22', 'game3amount_22', 'game4_22', 'game4amount_22',
'combG_22', 'combI_22']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name22,
multi=C.Profile[player.order22-1][0],
BoSid=C.Profile[player.order22-1][2],
BoSno=C.Profile[player.order22-1][3],
PDid=C.Profile[player.order22-1][5],
PDno=C.Profile[player.order22-1][6],
Ultid=C.Profile[player.order22-1][8],
Ultno=C.Profile[player.order22-1][9],
Pubid=C.Profile[player.order22-1][11],
Pubno=C.Profile[player.order22-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==22:
player.payname=player.name22
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order22-1][1] - player.cog_22)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order22-1][4] - C.Profile[player.order22-1][3]
if player.game1_22 == 1:
tmp2 = abs(player.game1amount_22)
elif player.game1_22 == 2:
tmp2 = -abs(player.game1amount_22)
elif player.game1_22 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order22-1][7] - C.Profile[player.order22-1][6]
if player.game2_22 == 1:
tmp2 = abs(player.game2amount_22)
elif player.game2_22 == 2:
tmp2 = -abs(player.game2amount_22)
elif player.game2_22 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order22-1][10] - C.Profile[player.order22-1][9]
if player.game3_22 == 1:
tmp2 = abs(player.game3amount_22)
elif player.game3_22 == 2:
tmp2 = -abs(player.game3amount_22)
elif player.game3_22 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order22-1][13] - C.Profile[player.order22-1][12]
if player.game4_22 == 1:
tmp2 = abs(player.game3amount_22)
elif player.game4_22 == 2:
tmp2 = -abs(player.game3amount_22)
elif player.game4_22 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order22-1][14] - player.combG_22)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order22-1][15] - player.combI_22)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV23(Page):
form_model = 'player'
form_fields = ['cog_23', 'game1_23', 'game1amount_23', 'game2_23', 'game2amount_23',
'game3_23', 'game3amount_23', 'game4_23', 'game4amount_23',
'combG_23', 'combI_23']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name23,
multi=C.Profile[player.order23-1][0],
BoSid=C.Profile[player.order23-1][2],
BoSno=C.Profile[player.order23-1][3],
PDid=C.Profile[player.order23-1][5],
PDno=C.Profile[player.order23-1][6],
Ultid=C.Profile[player.order23-1][8],
Ultno=C.Profile[player.order23-1][9],
Pubid=C.Profile[player.order23-1][11],
Pubno=C.Profile[player.order23-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==23:
player.payname=player.name23
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order23-1][1] - player.cog_23)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order23-1][4] - C.Profile[player.order23-1][3]
if player.game1_23 == 1:
tmp2 = abs(player.game1amount_23)
elif player.game1_23 == 2:
tmp2 = -abs(player.game1amount_23)
elif player.game1_23 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order23-1][7] - C.Profile[player.order23-1][6]
if player.game2_23 == 1:
tmp2 = abs(player.game2amount_23)
elif player.game2_23 == 2:
tmp2 = -abs(player.game2amount_23)
elif player.game2_23 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order23-1][10] - C.Profile[player.order23-1][9]
if player.game3_23 == 1:
tmp2 = abs(player.game3amount_23)
elif player.game3_23 == 2:
tmp2 = -abs(player.game3amount_23)
elif player.game3_23 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order23-1][13] - C.Profile[player.order23-1][12]
if player.game4_23 == 1:
tmp2 = abs(player.game3amount_23)
elif player.game4_23 == 2:
tmp2 = -abs(player.game3amount_23)
elif player.game4_23 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order23-1][14] - player.combG_23)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order23-1][15] - player.combI_23)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV24(Page):
form_model = 'player'
form_fields = ['cog_24', 'game1_24', 'game1amount_24', 'game2_24', 'game2amount_24',
'game3_24', 'game3amount_24', 'game4_24', 'game4amount_24',
'combG_24', 'combI_24']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name24,
multi=C.Profile[player.order24-1][0],
BoSid=C.Profile[player.order24-1][2],
BoSno=C.Profile[player.order24-1][3],
PDid=C.Profile[player.order24-1][5],
PDno=C.Profile[player.order24-1][6],
Ultid=C.Profile[player.order24-1][8],
Ultno=C.Profile[player.order24-1][9],
Pubid=C.Profile[player.order24-1][11],
Pubno=C.Profile[player.order24-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==24:
player.payname=player.name24
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order24-1][1] - player.cog_24)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order24-1][4] - C.Profile[player.order24-1][3]
if player.game1_24 == 1:
tmp2 = abs(player.game1amount_24)
elif player.game1_24 == 2:
tmp2 = -abs(player.game1amount_24)
elif player.game1_24 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order24-1][7] - C.Profile[player.order24-1][6]
if player.game2_24 == 1:
tmp2 = abs(player.game2amount_24)
elif player.game2_24 == 2:
tmp2 = -abs(player.game2amount_24)
elif player.game2_24 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order24-1][10] - C.Profile[player.order24-1][9]
if player.game3_24 == 1:
tmp2 = abs(player.game3amount_24)
elif player.game3_24 == 2:
tmp2 = -abs(player.game3amount_24)
elif player.game3_24 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order24-1][13] - C.Profile[player.order24-1][12]
if player.game4_24 == 1:
tmp2 = abs(player.game3amount_24)
elif player.game4_24 == 2:
tmp2 = -abs(player.game3amount_24)
elif player.game4_24 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order24-1][14] - player.combG_24)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order24-1][15] - player.combI_24)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV25(Page):
form_model = 'player'
form_fields = ['cog_25', 'game1_25', 'game1amount_25', 'game2_25', 'game2amount_25',
'game3_25', 'game3amount_25', 'game4_25', 'game4amount_25',
'combG_25', 'combI_25']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name25,
multi=C.Profile[player.order25-1][0],
BoSid=C.Profile[player.order25-1][2],
BoSno=C.Profile[player.order25-1][3],
PDid=C.Profile[player.order25-1][5],
PDno=C.Profile[player.order25-1][6],
Ultid=C.Profile[player.order25-1][8],
Ultno=C.Profile[player.order25-1][9],
Pubid=C.Profile[player.order25-1][11],
Pubno=C.Profile[player.order25-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==25:
player.payname=player.name25
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order25-1][1] - player.cog_25)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order25-1][4] - C.Profile[player.order25-1][3]
if player.game1_25 == 1:
tmp2 = abs(player.game1amount_25)
elif player.game1_25 == 2:
tmp2 = -abs(player.game1amount_25)
elif player.game1_25 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order25-1][7] - C.Profile[player.order25-1][6]
if player.game2_25 == 1:
tmp2 = abs(player.game2amount_25)
elif player.game2_25 == 2:
tmp2 = -abs(player.game2amount_25)
elif player.game2_25 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order25-1][10] - C.Profile[player.order25-1][9]
if player.game3_25 == 1:
tmp2 = abs(player.game3amount_25)
elif player.game3_25 == 2:
tmp2 = -abs(player.game3amount_25)
elif player.game3_25 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order25-1][13] - C.Profile[player.order25-1][12]
if player.game4_25 == 1:
tmp2 = abs(player.game3amount_25)
elif player.game4_25 == 2:
tmp2 = -abs(player.game3amount_25)
elif player.game4_25 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order25-1][14] - player.combG_25)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order25-1][15] - player.combI_25)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV26(Page):
form_model = 'player'
form_fields = ['cog_26', 'game1_26', 'game1amount_26', 'game2_26', 'game2amount_26',
'game3_26', 'game3amount_26', 'game4_26', 'game4amount_26',
'combG_26', 'combI_26']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name26,
multi=C.Profile[player.order26-1][0],
BoSid=C.Profile[player.order26-1][2],
BoSno=C.Profile[player.order26-1][3],
PDid=C.Profile[player.order26-1][5],
PDno=C.Profile[player.order26-1][6],
Ultid=C.Profile[player.order26-1][8],
Ultno=C.Profile[player.order26-1][9],
Pubid=C.Profile[player.order26-1][11],
Pubno=C.Profile[player.order26-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==26:
player.payname=player.name26
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order26-1][1] - player.cog_26)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order26-1][4] - C.Profile[player.order26-1][3]
if player.game1_26 == 1:
tmp2 = abs(player.game1amount_26)
elif player.game1_26 == 2:
tmp2 = -abs(player.game1amount_26)
elif player.game1_26 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order26-1][7] - C.Profile[player.order26-1][6]
if player.game2_26 == 1:
tmp2 = abs(player.game2amount_26)
elif player.game2_26 == 2:
tmp2 = -abs(player.game2amount_26)
elif player.game2_26 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order26-1][10] - C.Profile[player.order26-1][9]
if player.game3_26 == 1:
tmp2 = abs(player.game3amount_26)
elif player.game3_26 == 2:
tmp2 = -abs(player.game3amount_26)
elif player.game3_26 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order26-1][13] - C.Profile[player.order26-1][12]
if player.game4_26 == 1:
tmp2 = abs(player.game3amount_26)
elif player.game4_26 == 2:
tmp2 = -abs(player.game3amount_26)
elif player.game4_26 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order26-1][14] - player.combG_26)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order26-1][15] - player.combI_26)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV27(Page):
form_model = 'player'
form_fields = ['cog_27', 'game1_27', 'game1amount_27', 'game2_27', 'game2amount_27',
'game3_27', 'game3amount_27', 'game4_27', 'game4amount_27',
'combG_27', 'combI_27']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name27,
multi=C.Profile[player.order27-1][0],
BoSid=C.Profile[player.order27-1][2],
BoSno=C.Profile[player.order27-1][3],
PDid=C.Profile[player.order27-1][5],
PDno=C.Profile[player.order27-1][6],
Ultid=C.Profile[player.order27-1][8],
Ultno=C.Profile[player.order27-1][9],
Pubid=C.Profile[player.order27-1][11],
Pubno=C.Profile[player.order27-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==27:
player.payname=player.name27
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order27-1][1] - player.cog_27)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order27-1][4] - C.Profile[player.order27-1][3]
if player.game1_27 == 1:
tmp2 = abs(player.game1amount_27)
elif player.game1_27 == 2:
tmp2 = -abs(player.game1amount_27)
elif player.game1_27 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order27-1][7] - C.Profile[player.order27-1][6]
if player.game2_27 == 1:
tmp2 = abs(player.game2amount_27)
elif player.game2_27 == 2:
tmp2 = -abs(player.game2amount_27)
elif player.game2_27 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order27-1][10] - C.Profile[player.order27-1][9]
if player.game3_27 == 1:
tmp2 = abs(player.game3amount_27)
elif player.game3_27 == 2:
tmp2 = -abs(player.game3amount_27)
elif player.game3_27 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order27-1][13] - C.Profile[player.order27-1][12]
if player.game4_27 == 1:
tmp2 = abs(player.game3amount_27)
elif player.game4_27 == 2:
tmp2 = -abs(player.game3amount_27)
elif player.game4_27 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order27-1][14] - player.combG_27)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order27-1][15] - player.combI_27)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV28(Page):
form_model = 'player'
form_fields = ['cog_28', 'game1_28', 'game1amount_28', 'game2_28', 'game2amount_28',
'game3_28', 'game3amount_28', 'game4_28', 'game4amount_28',
'combG_28', 'combI_28']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name28,
multi=C.Profile[player.order28-1][0],
BoSid=C.Profile[player.order28-1][2],
BoSno=C.Profile[player.order28-1][3],
PDid=C.Profile[player.order28-1][5],
PDno=C.Profile[player.order28-1][6],
Ultid=C.Profile[player.order28-1][8],
Ultno=C.Profile[player.order28-1][9],
Pubid=C.Profile[player.order28-1][11],
Pubno=C.Profile[player.order28-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==28:
player.payname=player.name28
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order28-1][1] - player.cog_28)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order28-1][4] - C.Profile[player.order28-1][3]
if player.game1_28 == 1:
tmp2 = abs(player.game1amount_28)
elif player.game1_28 == 2:
tmp2 = -abs(player.game1amount_28)
elif player.game1_28 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order28-1][7] - C.Profile[player.order28-1][6]
if player.game2_28 == 1:
tmp2 = abs(player.game2amount_28)
elif player.game2_28 == 2:
tmp2 = -abs(player.game2amount_28)
elif player.game2_28 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order28-1][10] - C.Profile[player.order28-1][9]
if player.game3_28 == 1:
tmp2 = abs(player.game3amount_28)
elif player.game3_28 == 2:
tmp2 = -abs(player.game3amount_28)
elif player.game3_28 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order28-1][13] - C.Profile[player.order28-1][12]
if player.game4_28 == 1:
tmp2 = abs(player.game3amount_28)
elif player.game4_28 == 2:
tmp2 = -abs(player.game3amount_28)
elif player.game4_28 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order28-1][14] - player.combG_28)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order28-1][15] - player.combI_28)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV29(Page):
form_model = 'player'
form_fields = ['cog_29', 'game1_29', 'game1amount_29', 'game2_29', 'game2amount_29',
'game3_29', 'game3amount_29', 'game4_29', 'game4amount_29',
'combG_29', 'combI_29']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name29,
multi=C.Profile[player.order29-1][0],
BoSid=C.Profile[player.order29-1][2],
BoSno=C.Profile[player.order29-1][3],
PDid=C.Profile[player.order29-1][5],
PDno=C.Profile[player.order29-1][6],
Ultid=C.Profile[player.order29-1][8],
Ultno=C.Profile[player.order29-1][9],
Pubid=C.Profile[player.order29-1][11],
Pubno=C.Profile[player.order29-1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround==29:
player.payname=player.name29
player.paytask=int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20*abs(C.Profile[player.order29-1][1] - player.cog_29)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order29-1][4] - C.Profile[player.order29-1][3]
if player.game1_29 == 1:
tmp2 = abs(player.game1amount_29)
elif player.game1_29 == 2:
tmp2 = -abs(player.game1amount_29)
elif player.game1_29 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order29-1][7] - C.Profile[player.order29-1][6]
if player.game2_29 == 1:
tmp2 = abs(player.game2amount_29)
elif player.game2_29 == 2:
tmp2 = -abs(player.game2amount_29)
elif player.game2_29 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order29-1][10] - C.Profile[player.order29-1][9]
if player.game3_29 == 1:
tmp2 = abs(player.game3amount_29)
elif player.game3_29 == 2:
tmp2 = -abs(player.game3amount_29)
elif player.game3_29 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order29-1][13] - C.Profile[player.order29-1][12]
if player.game4_29 == 1:
tmp2 = abs(player.game3amount_29)
elif player.game4_29 == 2:
tmp2 = -abs(player.game3amount_29)
elif player.game4_29 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1-tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20*abs(C.Profile[player.order29-1][14] - player.combG_29)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20*abs(C.Profile[player.order29-1][15] - player.combI_29)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class CV30(Page):
form_model = 'player'
form_fields = ['cog_30', 'game1_30', 'game1amount_30', 'game2_30', 'game2amount_30',
'game3_30', 'game3amount_30', 'game4_30', 'game4amount_30',
'combG_30', 'combI_30']
# @staticmethod
# def is_displayed(player):
# return player.comp_check == 1
@staticmethod
def vars_for_template(player):
return dict(
name=player.name30,
multi=C.Profile[player.order30 - 1][0],
BoSid=C.Profile[player.order30 - 1][2],
BoSno=C.Profile[player.order30 - 1][3],
PDid=C.Profile[player.order30 - 1][5],
PDno=C.Profile[player.order30 - 1][6],
Ultid=C.Profile[player.order30 - 1][8],
Ultno=C.Profile[player.order30 - 1][9],
Pubid=C.Profile[player.order30 - 1][11],
Pubno=C.Profile[player.order30 - 1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround == 30:
player.payname = player.name30
player.paytask = int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20 * abs(C.Profile[player.order30 - 1][1] - player.cog_30)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order30 - 1][4] - C.Profile[player.order30 - 1][3]
if player.game1_30 == 1:
tmp2 = abs(player.game1amount_30)
elif player.game1_30 == 2:
tmp2 = -abs(player.game1amount_30)
elif player.game1_30 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1 - tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order30 - 1][7] - C.Profile[player.order30 - 1][6]
if player.game2_30 == 1:
tmp2 = abs(player.game2amount_30)
elif player.game2_30 == 2:
tmp2 = -abs(player.game2amount_30)
elif player.game2_30 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1 - tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order30 - 1][10] - C.Profile[player.order30 - 1][9]
if player.game3_30 == 1:
tmp2 = abs(player.game3amount_30)
elif player.game3_30 == 2:
tmp2 = -abs(player.game3amount_30)
elif player.game3_30 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1 - tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order30 - 1][13] - C.Profile[player.order30 - 1][12]
if player.game4_30 == 1:
tmp2 = abs(player.game3amount_30)
elif player.game4_30 == 2:
tmp2 = -abs(player.game3amount_30)
elif player.game4_30 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1 - tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20 * abs(C.Profile[player.order30 - 1][14] - player.combG_30)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20 * abs(C.Profile[player.order30 - 1][15] - player.combI_30)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class Comp(Page):
form_model = 'player'
form_fields = ['comp1', 'comp2', 'comp3']
def before_next_page(player: Player, timeout_happened):
if player.comp1 == 2:
if player.comp2 == 1:
if player.comp3 == 3:
player.comp_check = 1
# @staticmethod
# def error_message(player, values):
# if values['comp1'] != 2 & values['comp2'] != 1:
# return 'Your answer for the AA question is wrong.'
# elif values['comp1'] != 2 & values['comp2'] == 1:
# return 'Your answer for the question 1 is wrong.'
class CompInst2(Page):
form_model = 'player'
@staticmethod
def is_displayed(player):
return player.comp_check == 0
class Comp2(Page):
form_model = 'player'
form_fields = ['comp1', 'comp2', 'comp3']
@staticmethod
def is_displayed(player):
return player.comp_check == 0
@staticmethod
def before_next_page(player: Player, timeout_happened):
if player.comp1 == 2:
if player.comp2 == 1:
if player.comp3 == 3:
player.comp_check = 1
class CompInst3(Page):
form_model = 'player'
@staticmethod
def is_displayed(player):
return player.comp_check == 0
class Comp3(Page):
form_model = 'player'
form_fields = ['comp1', 'comp2', 'comp3']
@staticmethod
def is_displayed(player):
return player.comp_check == 0
def before_next_page(player: Player, timeout_happened):
if player.comp1 == 2:
if player.comp2 == 1:
if player.comp3 == 3:
player.comp_check = 1
else:
player.payoff = 0
class Results(Page):
def vars_for_template(player):
name = player.payname
task = 'empty'
diff = 0
if player.comp_check == 1:
diff=player.paydiff
if player.paytask ==1:
task = 'your guess about Cognitive Test is chosen for your payment.'
elif player.paytask == 2:
task = 'your guess about Game 1 is chosen for your payment.'
elif player.paytask == 3:
task = 'your guess about Game 2 is chosen for your payment.'
elif player.paytask == 4:
task = 'your guess about Game 3 is chosen for your payment.'
elif player.paytask == 5:
task = 'your guess about Game 4 is chosen for your payment.'
elif player.paytask == 6:
task = 'your guess about the group gain in the combined test is chosen for your payment.'
elif player.paytask == 7:
task = 'your guess about the additional personal gain in the combined test is chosen for your payment.'
return dict(
name=name,
task=task,
diff=diff
)
# def before_next_page(player: Player, timeout_happened):
# a=10*6 #earned
# player.payoff=10*cu(300-a)
class ProlificID(Page):
form_model = 'player'
form_fields = ['prolific_id']
class CV1_withButton(Page):
form_model = 'player'
form_fields = ['cog_1', 'game1_1', 'game1amount_1', 'game2_1', 'game2amount_1',
'game3_1', 'game3amount_1', 'game4_1', 'game4amount_1',
'combG_1', 'combI_1']
@staticmethod
def vars_for_template(player):
return dict(
name=player.name1,
multi=C.Profile[player.order1 - 1][0],
BoSid=C.Profile[player.order1 - 1][2],
BoSno=C.Profile[player.order1 - 1][3],
PDid=C.Profile[player.order1 - 1][5],
PDno=C.Profile[player.order1 - 1][6],
Ultid=C.Profile[player.order1 - 1][8],
Ultno=C.Profile[player.order1 - 1][9],
Pubid=C.Profile[player.order1 - 1][11],
Pubno=C.Profile[player.order1 - 1][12]
)
def before_next_page(player: Player, timeout_happened):
if player.payround == 1:
player.payname = player.name1
player.paytask = int(random.uniform(1, 8))
if player.paytask == 8:
player.paytask = 7
if player.paytask == 1: # cog
tmp = 20 * abs(C.Profile[player.order1 - 1][1] - player.cog_1)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 2: # BoS
tmp1 = C.Profile[player.order1 - 1][4] - C.Profile[player.order1 - 1][3]
if player.game1_1 == 1:
tmp2 = abs(player.game1amount_1)
elif player.game1_1 == 2:
tmp2 = -abs(player.game1amount_1)
elif player.game1_1 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1 - tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 3: # PD
tmp1 = C.Profile[player.order1 - 1][7] - C.Profile[player.order1 - 1][6]
if player.game2_1 == 1:
tmp2 = abs(player.game2amount_1)
elif player.game2_1 == 2:
tmp2 = -abs(player.game2amount_1)
elif player.game2_1 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1 - tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 4: # Ult
tmp1 = C.Profile[player.order1 - 1][10] - C.Profile[player.order1 - 1][9]
if player.game3_1 == 1:
tmp2 = abs(player.game3amount_1)
elif player.game3_1 == 2:
tmp2 = -abs(player.game3amount_1)
elif player.game3_1 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1 - tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 5: # Pub
tmp1 = C.Profile[player.order1 - 1][13] - C.Profile[player.order1 - 1][12]
if player.game4_1 == 1:
tmp2 = abs(player.game3amount_1)
elif player.game4_1 == 2:
tmp2 = -abs(player.game3amount_1)
elif player.game4_1 == 3:
tmp2 = 0
tmp = 20 * abs(tmp1 - tmp2)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 6: # Comb Group
tmp = 20 * abs(C.Profile[player.order1 - 1][14] - player.combG_1)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
elif player.paytask == 7: # Comb Individual
tmp = 20 * abs(C.Profile[player.order1 - 1][15] - player.combI_1)
player.payoff = max(0, 10 * cu(250 - tmp))
player.paydiff = 0.05 * tmp
class AA(Page):
form_model = 'player'
form_fields = ['level', 'level2']
class InstN1(Page):
def vars_for_template(player):
return dict(
n1=player.name1,
n2=player.name2,
n3=player.name3,
n4=player.name4,
n5=player.name5,
n6=player.name6,
n7=player.name7,
n8=player.name8,
n9=player.name9,
n10=player.name10,
n11=player.name11,
n12=player.name12,
n13=player.name13,
n14=player.name14,
n15=player.name15,
n16=player.name16,
n17=player.name17,
n18=player.name18,
n19=player.name19,
n20=player.name20,
n21=player.name21,
n22=player.name22,
n23=player.name23,
n24=player.name24,
n25=player.name25,
n26=player.name26,
n27=player.name27,
n28=player.name28,
n29=player.name29,
n30=player.name30
)
class InstN2(Page):
pass
class InstN3(Page):
pass
class InstN4(Page):
pass
class InstN5(Page):
pass
class InstN6(Page):
pass
class InstN7(Page):
pass
class InstN8(Page):
pass
class InstN9(Page):
pass
#
#
# page_sequence = [Consent1, ProlificID, Inst1, Inst2, Comp, CompInst2, Comp2, CompInst3, Comp3,
# CV1, CV2, CV3, CV4, CV5, CV6, CV7, CV8, CV9, CV10,
# CV11, CV12, CV13, CV14, CV15, CV16, CV17, CV18, CV19, CV20,
# CV21, CV22, CV23, CV24, CV25, CV26, CV27, CV28, CV29, CV30,
# Results]
page_sequence = [Consent1, ProlificID, InstN1, InstN3, InstN4, InstN9, InstN8, CV1, CV2, CV3, CV4, CV5, CV6, CV7, CV8, CV9, CV10,
CV11, CV12, CV13, CV14, CV15, CV16, CV17, CV18, CV19, CV20,
CV21, CV22, CV23, CV24, CV25, CV26, CV27, CV28, CV29, CV30, Results]