from otree.api import BaseConstants, Currency # ******************************************************************************************************************** # # *** CLASS CONSTANTS *** # # ******************************************************************************************************************** # class Constants(BaseConstants): # oTree Constants name_in_url = 'bret' players_per_group = None # ---------------------------------------------------------------------------------------------------------------- # # --- Overall Settings and Appearance --- # # ---------------------------------------------------------------------------------------------------------------- # # value of single collected box # if the bomb is not collected, player's payoff per round is determined by times # note that the currency of any earnings is determined by the oTree settings in settings.py # if you set this to a decimal number, you must set POINTS_DECIMAL_PLACES in settings.py box_value = Currency(1) # number of rows and columns # i.e. the total number of boxes is determined by times num_rows = 8 num_cols = 8 # box height and box width in pixels # make sure that the size of the boxes fits the screen of the device # note that the layout is responsive, i.e. boxes will break into new rows if they don't fit box_height = '50px' box_width = '50px' # number of rounds to be played num_rounds = 5 # determines whether all rounds played are payed-off or whether one round is randomly chosen for payment # if , one round is randomly determined for payment # if , the final payoff of the task is the sum of all rounds played # note that this is only of interest for the case of larger than 1 random_payoff = True # if , a separate template "Instructions.html" is rendered prior to the task in round 1 # if , the task starts immediately (e.g. in case of printed instructions) instructions = True # show feedback by resolving boxes, i.e. toggle boxes and show whether bomb was collected or not # if , the button "Solve" will be rendered and active after game play ends ("Stop") # if , the button "Solve" won't be rendered such that no feedback about game outcome is provided feedback = True # show results page summarizing the game outcome # if , a separate page containing all relevant information is displayed after finishing the task # if larger than 1, results are summarized in a table and only shown after all rounds have been played results = True # ---------------------------------------------------------------------------------------------------------------- # # --- Settings Determining Game Play --- # # ---------------------------------------------------------------------------------------------------------------- # # "dynamic" or "static" game play # if , one box per time interval is collected automatically # in case of , game play is affected by the variables and below # if , subjects collect as many boxes as they want by clicking or entering the respective number # in case of , game play is affected by the variables , and dynamic = True # time interval between single boxes being collected (in seconds) # note that this only affects game play if time_interval = 1.00 # collect boxes randomly or systematically # if , boxes are collected row-wise one-by-one, starting in the top-left corner # if , boxes are collected randomly (Fisher-Yates Algorithm) # note that this affects game play in both cases, and random = True # determines whether static game play allows for selecting boxes by clicking or by entering a number # if , game play is similar to Slovic (1965), i.e. boxes are collected by subjects # if , subjects enter the number of boxes they want to collect # note that this only affects game play if devils_game = False # determine whether boxes can be toggled only once or as often as clicked # if boxes can be selected and de-selected indefinitely often # if boxes can be selected only once (i.e. decisions can not be undone) # note that this only affects game play if and undoable = True #LIA ADDED -not working! #instructions_template = 'bret/Instructions.html'