from otree.api import Currency as c, currency_range, expect, Bot from . import * class PlayerBot(Bot): def play_round(self): yield Contribute, dict(contribution=cu(100)) # dictは入力したりするものを指定するために使う yield Results # 1ページにつきyieldを指定する """ ifを使って以下のような設定もできる -- if self.round_number == 1: yield pages.Introduction if self.player.id_in_group == 1: yield pages.Offer, dict(offer=30) else: yield pages.Accept, dict(offer_accepted=True) -- ifのときは、yieldでwait pagesに関しては無視してよい。 """