Hello,
I've been working on a payoff function for a few days now, since it doesn't recognize that a bool is true.
The boolean field:
expectations1C1_check = models.BooleanField(initial=False)
def set_expectations1C1_check(self):
p1 = self.get_player_by_id(1)
p2 = self.get_player_by_id(2)
self.expectations1C1_check = p1.value['expectations1C'] == p2.participant.vars['take'].value['take']
the payoff:
def set_payoffs(self):
p1 = self.get_player_by_id(1)
p2 = self.get_player_by_id(2)
p3 = self.get_player_by_id(3)
for p in self.get_players():
p.treatment = p.session.vars['treatment']
if p.treatment == 1:
print('treatment')
if p == p3:
print('p3')
if self.expectations1T_check == True:
print('expectations1T_check')
if self.expectations2T_check == True:
for p in self.get_players():
print('payoff4)')
p.payoff = 4
else:
for p in self.get_players():
p.payoff = 2
...
with the print function I found out that tree thinks that self.expectations1T_check == False, even when it is supposed to be true.
Did I define the Boolean Field wrong? How do I fix this?
Thank you for your help!
Best,
Linda