from otree.api import Currency as c, currency_range from . import pages from ._builtin import Bot from .models import Constants class PlayerBot(Bot): """"Include docstring which also explains the if functionality in this class""" # TODO: INCLUDE ASSERT def play_round(self): # yield (pages.General_instructions) # yield (pages.Specific_instructions) if self.player.role() == 'lender': yield (pages.Determine_Rate_of_Return, {'rate_of_return': 2}) print(self.Constants.rate_of_return) yield (pages.Loan_amount, {'investment': 4}) yield (pages.Collateral_decision, {'satisfied': True}) yield (pages.Seize_collateral) else: yield (pages.Collateral_offer, {'collateral': 3}) yield (pages.Loan_package, {'package_accepted': True}) yield (pages.Realize_return, {'lender_return': 6}) yield (pages.Results)