63 lines
1.8 KiB
Python
63 lines
1.8 KiB
Python
![]() |
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):
|
||
|
yield (pages.Bienvenue)
|
||
|
#yield (pages.Questionnaire5)
|
||
|
|
||
|
|
||
|
# yield (pages.Questionnaire4, {
|
||
|
# 'q_40_etude': 1,
|
||
|
# 'q_41_gender': 1,
|
||
|
# 'q_42_age': random.randint(18, 40),
|
||
|
# 'q_43_nationalite': 5,
|
||
|
# 'q_44_revenu': 1,
|
||
|
# 'q3_countries': 1,
|
||
|
# 'q_46_logement_ville': 'fr',
|
||
|
# 'q_31': 3,
|
||
|
# 'q_47_residence': 1,
|
||
|
# 'q_48_satisfaction': 2,
|
||
|
# 'q_49_propositions': 'sasasadad'
|
||
|
# })
|
||
|
|
||
|
# yield (pages.Questionnaire6, {
|
||
|
# 'g1_easy_to_understand':1,
|
||
|
# 'g1_involves_risk':1,
|
||
|
# 'g1_annoying_boring':1,
|
||
|
# 'g2_easy_to_understand':1,
|
||
|
# 'g2_involves_risk':1,
|
||
|
# 'g2_annoying_boring':1,
|
||
|
# 'g3_easy_to_understand':1,
|
||
|
# 'g3_involves_altruism':1,
|
||
|
# 'g3_annoying_boring':1,
|
||
|
# 'g4_easy_to_understand':1,
|
||
|
# 'g4_involves_altruism':1,
|
||
|
# 'g4_annoying_boring':1,
|
||
|
# })
|
||
|
|
||
|
yield (pages.Questionnaire7crt, {
|
||
|
'crt1':5,
|
||
|
'crt2':5,
|
||
|
'crt3':47,
|
||
|
})
|
||
|
|
||
|
|
||
|
yield (pages.Result, {
|
||
|
'lastname': 'a',
|
||
|
'firstname': 'b',
|
||
|
'email': '@',
|
||
|
'room': 'a',
|
||
|
})
|
||
|
|
||
|
#yield (pages.FinalPage2)
|
||
|
|
||
|
|