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.participant.vars['app_sequence_select'] > 2:

            if self.round_number == 1:
                yield (pages.Bienvenue)


            if self.player.participant.vars['app_sequence_select'] > 2: #3 ou 4
                yield (pages.Risk_BinsWanger_qc)

                yield (pages.Risk_BinsWanger_qc2, {
                    'riskqc_a': 1,
                    'riskqc_b': 3,
                    'riskqc_c': 1,
                })

                yield (pages.Risk_BinsWanger, {
                    'choicerisk': random.randint(1, 9),
                    'risk_assessment_bw': 1,
                    'confidence_level_bw': 1,
                    'memory_recall_bw': 1,
                })



