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.round_number in self.participant.vars['instruction_round']: yield pages.AuctionInstructions yield pages.ComprehensionAuction, dict(qn_win=1, qn_pay=1, qn_lose=1, qn_time=1) yield pages.ComprehensionAuctionCorrect yield pages.Trial if self.round_number in [i+1 for i in self.participant.vars['instruction_round']]: yield pages.BeginStudy if self.round_number not in self.participant.vars['instruction_round']: yield pages.Valuation, dict(confidence=5) yield pages.Auction, dict(bid=3) yield pages.Result if self.round_number == Constants.num_rounds: yield pages.FinishedTasks yield pages.PayoffandGoodbye