Test_Johanne/exp_e4c_fr_p2_risk_gneezy/tests.py

33 lines
887 B
Python
Raw Permalink Normal View History

2025-03-06 10:28:01 +01:00
from otree.api import Currency as c, currency_range, Submission
from . import pages
from ._builtin import Bot
from .models import Constants
import random
# **********************************************************************************************************************
# *** BOT
# **********************************************************************************************************************
class PlayerBot(Bot):
def play_round(self):
if self.player.id_in_group % 2 == 1 and self.participant.vars['versionexp'] == 1:
yield (pages.L_risk11_qc, {
'risk11_qc_a': 2,
'risk11_qc_b': 4,
'risk11_qc_c': 1,
})
yield (pages.M_risk11, {
'risk11_a': 0, #random.randint(0, 10),
'risk11_b': 10 ,
})
yield (pages.Jeu1End)