from typing import List from otree.api import cu, Currency MIN_ON_TASK = 20 SEC_ON_TASK = MIN_ON_TASK * 60 def get_treatment(self): return self.session.config["treatment"] def is_treatment(self, treatment) -> bool: return get_treatment(self) == treatment def get_tournament_prizes(self) -> List[Currency]: configs = self.session.config return [ cu(configs["tournament_prize_1"]), cu(configs["tournament_prize_2"]), cu(configs["tournament_prize_3"]), cu(configs["tournament_prize_4"]), ] def get_fixed_wage(self) -> Currency: return cu(self.session.config["fixed_wage"]) def get_piece_rate(self) -> Currency: return cu(self.session.config["piece_rate"])