from otree.api import Currency as c, currency_range from . import pages from ._builtin import Bot from .models import Constants class PlayerBot(Bot): def play_round(self): if self.participant.vars['init'] == 0: yield (pages.Comp_Instructions) if self.participant.vars['count'] < Constants.rnend: yield (pages.PreComputer) if self.participant.vars['count'] < Constants.rnend: yield (pages.Player1, {'p1sel': 'Do not delete any link'}) if self.participant.vars['count'] < Constants.rnend: yield (pages.Computer) if self.participant.vars['showresult'] == 1 \ and self.participant.vars['count'] <= Constants.rnend \ and self.participant.vars['done'] == 0: yield (pages.Results) if self.participant.vars['showresult'] == 1 \ and self.participant.vars['count'] == Constants.rnend \ and self.participant.vars['done'] == 0: yield (pages.FinalResults)