33 lines
887 B
Python
33 lines
887 B
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):
|
||
|
|
||
|
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)
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|