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.round_number == 1 and self.participant.vars['app_sequence_select'] < 3:
            if self.round_number == 1:
                yield (pages.Bienvenue)


            if  self.player.participant.vars['app_sequence_select'] < 3:
                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),
                })




