Ejemplo n.º 1
0
    def play_1(self):
        # P1/A - propose contract
        fixed_pay = random.choice(money_range(-self.subsession.max_fixed_payment, self.subsession.max_fixed_payment, 0.50))
        return_share = random.choice([x/100.0 for x in range(10, 110, 10)])

        time.sleep(sleep_seconds())
        self.submit(views.Offer,
                    {'agent_fixed_pay': fixed_pay,
                     'agent_return_share': return_share})
Ejemplo n.º 2
0
    def play(self):

        # start
        self.submit(views.Introduction)

        # bid
        self.submit(views.Bid, {'bid_amount': random.choice(money_range(0, Constants.max_bid_amount))})

        # results
        self.submit(views.Results)
Ejemplo n.º 3
0
    def play(self):
        # compete price
        self.submit(
            views.Decide, {
                'price':
                random.choice(
                    money_range(self.subsession.marginal_cost,
                                self.subsession.maximum_price, 0.05))
            })

        # results
        self.submit(views.Results)
Ejemplo n.º 4
0
    def play_1(self):
        # P1/A - propose contract
        fixed_pay = random.choice(
            money_range(-self.subsession.max_fixed_payment,
                        self.subsession.max_fixed_payment, 0.50))
        return_share = random.choice([x / 100.0 for x in range(10, 110, 10)])

        time.sleep(sleep_seconds())
        self.submit(views.Offer, {
            'agent_fixed_pay': fixed_pay,
            'agent_return_share': return_share
        })
Ejemplo n.º 5
0
    def play(self):

        # start
        self.submit(views.Introduction)

        # bid
        self.submit(views.Bid, {
            'bid_amount':
            random.choice(money_range(0, Constants.max_bid_amount))
        })

        # results
        self.submit(views.Results)
Ejemplo n.º 6
0
 def sp_choices(self):
     return money_range(0, self.cash, 0.5)
Ejemplo n.º 7
0
 def bid_amount_choices(self):
     return money_range(self.subsession.min_allowable_bid, self.subsession.max_allowable_bid, 0.05)
Ejemplo n.º 8
0
    def play(self):
        # compete price
        self.submit(views.Decide, {'price': random.choice(money_range(Constants.marginal_cost, Constants.maximum_price, 0.05))})

        # results
        self.submit(views.Results)
Ejemplo n.º 9
0
 def contribution_choices(self):
     return money_range(0, self.endowment, 1.00)
Ejemplo n.º 10
0
 def agent_fixed_pay_choices(self):
     return money_range(-Constants.max_fixed_payment, Constants.max_fixed_payment, 0.50)
Ejemplo n.º 11
0
 def bid_amount_choices(self):
     return money_range(Constants.min_allowable_bid, Constants.max_allowable_bid, 0.05)
Ejemplo n.º 12
0
 def bid_amount_choices(self):
     return money_range(self.subsession.min_allowable_bid,
                        self.subsession.max_allowable_bid, 0.05)
Ejemplo n.º 13
0
 def calculate_value(self):
     self.random_value = random.choice(money_range(0.00, 1.00))
Ejemplo n.º 14
0
 def sent_back_amount_choices(self):
     """Range of allowed values during send back"""
     return money_range(0, self.sent_amount * 3, self.subsession.increment_amount)
Ejemplo n.º 15
0
 def calculate_value(self):
     self.random_value = random.choice(money_range(0.00, 1.00))
Ejemplo n.º 16
0
 def sent_amount_choices(self):
     """Range of allowed values during send"""
     return money_range(0, self.subsession.amount_allocated, self.subsession.increment_amount)
Ejemplo n.º 17
0
 def request_amount_choices(self):
     """Range of allowed request amount"""
     return money_range(0, self.subsession.amount_shared, 0.05)
Ejemplo n.º 18
0
 def claim_choices(self):
     """Range of allowed claim values"""
     return money_range(self.subsession.min_amount,
                        self.subsession.max_amount, 0.05)
Ejemplo n.º 19
0
 def request_amount_choices(self):
     """Range of allowed request amount"""
     return money_range(0, self.subsession.amount_shared, 0.05)
Ejemplo n.º 20
0
 def bid_amount_choices(self):
     return money_range(0, Constants.max_bid_amount, 0.05)
Ejemplo n.º 21
0
 def bid_amount_choices(self):
     return money_range(0, self.subsession.max_bid_amount, 0.05)
Ejemplo n.º 22
0
 def contribution_choices(self):
     return money_range(0,self.subsession.endowment,1.00)
Ejemplo n.º 23
0
 def sp_choices(self):
     return money_range(0, self.cash, 0.5)
Ejemplo n.º 24
0
 def bid_amount_choices(self):
     return money_range(0, self.subsession.max_bid_amount, 0.05)
Ejemplo n.º 25
0
 def bid_amount_choices(self):
     return money_range(0, Constants.max_bid_amount, 0.05)
Ejemplo n.º 26
0
 def offer_amount_choices(self):
     return money_range(0, self.subsession.allocated_amount, 0.05)
Ejemplo n.º 27
0
 def offer_amount_choices(self):
     return money_range(0, Constants.allocated_amount, 0.05)
Ejemplo n.º 28
0
 def price_choices(self):
     return money_range(Constants.marginal_cost, Constants.maximum_price, 0.05)
Ejemplo n.º 29
0
 def price_choices(self):
     return money_range(Constants.marginal_cost, Constants.maximum_price,
                        0.05)
Ejemplo n.º 30
0
 def price_choices(self):
     return money_range(self.subsession.marginal_cost,
                        self.subsession.maximum_price, 0.05)
Ejemplo n.º 31
0
 def price_choices(self):
     return money_range(self.subsession.marginal_cost, self.subsession.maximum_price, 0.05)
Ejemplo n.º 32
0
 def agent_fixed_pay_choices(self):
     return money_range(-self.subsession.max_fixed_payment,
                        self.subsession.max_fixed_payment, 0.50)
Ejemplo n.º 33
0
 def agent_fixed_pay_choices(self):
     return money_range(-self.subsession.max_fixed_payment, self.subsession.max_fixed_payment, 0.50)
Ejemplo n.º 34
0
 def offer_amount_choices(self):
     return money_range(0, Constants.allocated_amount, 0.05)
Ejemplo n.º 35
0
 def claim_choices(self):
     """Range of allowed claim values"""
     return money_range(self.subsession.min_amount, self.subsession.max_amount, 0.05)
Ejemplo n.º 36
0
 def offer_amount_choices(self):
     return money_range(0, self.subsession.allocated_amount, 0.05)