from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class MyAllocationA(Page): form_model = 'group' form_fields = ['winner_amountA'] def is_displayed(self): return self.player.id_in_group == 1 pass class MyAllocationB(Page): form_model = 'group' form_fields = ['winner_amountB'] def is_displayed(self): return self.player.id_in_group == 2 pass class MyMultiplicationA(Page): form_model = 'player' form_fields = ['q1a', 'q2a', 'q3a', 'q4a', 'q5a', 'q6a','q7a'] timeout_seconds = 60 pass class MyMultiplicationB(Page): form_model = 'player' form_fields = ['q1b', 'q2b', 'q3b', 'q4b', 'q5b', 'q6b','q7b'] timeout_seconds = 60 pass class WaitForP1(WaitPage): def after_all_players_arrive(self): pass class WaitForMult1(WaitPage): after_all_players_arrive = 'set_payoffs1' # def after_all_players_arrive(self): # print('players have arrive multi') class WaitforMult2(WaitPage): after_all_players_arrive = 'set_payoffs2' class WaitForP2(WaitPage): def after_all_players_arrive(self): pass class ResultsWaitPage(WaitPage): after_all_players_arrive = 'set_payoffs2' #def after_all_players_arrive(self): # pass class Results(Page): pass class Results1(Page): after_all_players_arrive = 'set_payoffs1' def after_all_players_arrive(self): pass class Results2(Page): after_all_players_arrive = 'set_payoffs2' def after_all_players_arrive(self): pass pass class Questionnaire(Page): form_model = 'player' form_fields = ['name', 'gender', 'politics', 'gameTheory', 'nash', 'education','talent','luck','hardWork'] class Instructions(Page): pass page_sequence = [Instructions,MyAllocationA, WaitForP1, MyMultiplicationA, WaitForMult1, Results1, MyAllocationB, WaitForP2, MyMultiplicationB,WaitforMult2, Results2, Questionnaire]