from otree.api import Currency as c, currency_range, expect, Bot from . import * import random class PlayerBot(Bot): def play_round(self): yield intro_4 yield Instrucciones1, {"colors4t1": random.choice([True, False])} questions = ['s4t100','s4t101','s4t102','s4t103','s4t104', 's4t105','s4t106','s4t107','s4t108','s4t109','s4t110','s4t111'] # Esta no es una representación realista de como son las decisions pero no me importa cutoff_value = random.randint(0, len(questions)) answers = [1 for _ in range(cutoff_value + 1)] + [2 for _ in range(21 - cutoff_value)] yield table1, dict(zip(questions, answers)) yield Instrucciones2, {"colors4t2": random.choice([True, False])} questions = ['s4t200','s4t201','s4t202','s4t203','s4t204', 's4t205','s4t206','s4t207','s4t208','s4t209','s4t210','s4t211'] # Esta no es una representación realista de como son las decisions pero no me importa cutoff_value = random.randint(0, len(questions)) answers = [1 for _ in range(cutoff_value)] + [2 for _ in range(21 - cutoff_value)] yield table2, dict(zip(questions, answers)) yield Instrucciones3, {"colors4t3": random.choice([True, False])} questions = ['s4t300','s4t301','s4t302','s4t303','s4t304','s4t305','s4t306','s4t307','s4t308','s4t309','s4t310','s4t311'] # Esta no es una representación realista de como son las decisions pero no me importa cutoff_value = random.randint(0, len(questions)) answers = [1 for _ in range(cutoff_value)] + [2 for _ in range(21 - cutoff_value)] yield table3, dict(zip(questions, answers))