from otree.api import * from . import * # TODO: to be completed class PlayerBot(Bot): def play_round(self): pvars = self.player.participant.vars if not pvars.get('unmatched') is True: if pvars.get('role') == "COO" and pvars.get('treatment') == 'yes': yield COOChoice, dict() if pvars.get('role') == "COO" and pvars.get('treatment') == 'no': yield COOnoChoice if pvars.get('role') == "DM" and pvars.get('treatment') == 'no': yield DMChoice, dict() if pvars.get('role') == "DM" and pvars.get('treatment') == 'no': yield DMnoChoice, dict() yield Results if self.player.is_dropout: yield DropoutPage yield PEQ, dict() if self.round_number == Constants.num_rounds: yield FinalPayout