from ._builtin import Page, WaitPage from otree.api import Currency as c, currency_range from .models import Constants class Introduction(Page): """Description of the game: How to play and returns expected""" <<<<<<< HEAD ======= >>>>>>> 0982dc5566ffb7cb2176b6338e4f4497a3d00fc3 pass class Contribute(Page): """Player: Choose how much to contribute""" form_model = 'player' form_fields = ['contribution'] <<<<<<< HEAD class ResultsWaitPage(WaitPage): after_all_players_arrive = 'set_payoffs' ======= timeout_submission = {'contribution': c(Constants.endowment / 2)} class ResultsWaitPage(WaitPage): def after_all_players_arrive(self): self.group.set_payoffs() >>>>>>> 0982dc5566ffb7cb2176b6338e4f4497a3d00fc3 body_text = "Waiting for other participants to contribute." class Results(Page): """Players payoff: How much each has earned""" def vars_for_template(self): <<<<<<< HEAD return dict(total_earnings=self.group.total_contribution * Constants.multiplier) page_sequence = [Introduction, Contribute, ResultsWaitPage, Results] ======= return { 'total_earnings': self.group.total_contribution * Constants.multiplier, } page_sequence = [ Introduction, Contribute, ResultsWaitPage, Results ] >>>>>>> 0982dc5566ffb7cb2176b6338e4f4497a3d00fc3