from . import models from ._builtin import Page, WaitPage from otree.api import Currency as c, currency_range from .models import Constants class Instructions(Page): """Description of the game: How to play and returns expected""" def is_displayed(self): return self.round_number == 1 class Training(Page): form_model = models.Player form_fields = ['training1', 'training2', 'training3', 'training4',] class Contribute(Page): """Player: Choose how much to contribute""" form_model = models.Player form_fields = ['contribution'] timeout_submission = {'contribution': c(Constants.endowment / 2)} page_sequence = [ Instructions, Training, Contribute, ]