diff --git a/examples/bank_reserves/bank_reserves/agents.py b/examples/bank_reserves/bank_reserves/agents.py index 2863df99..5d81a65c 100644 --- a/examples/bank_reserves/bank_reserves/agents.py +++ b/examples/bank_reserves/bank_reserves/agents.py @@ -42,9 +42,9 @@ def bank_balance(self): # subclass of RandomWalker, which is subclass to Mesa Agent class Person(RandomWalker): - def __init__(self, unique_id, pos, model, moore, bank, rich_threshold): + def __init__(self, unique_id, model, moore, bank, rich_threshold): # init parent class with required parameters - super().__init__(unique_id, pos, model, moore=moore) + super().__init__(unique_id, model, moore=moore) # the amount each person has in savings self.savings = 0 # total loan amount person has outstanding diff --git a/examples/bank_reserves/bank_reserves/model.py b/examples/bank_reserves/bank_reserves/model.py index f0f4ba77..421854fb 100644 --- a/examples/bank_reserves/bank_reserves/model.py +++ b/examples/bank_reserves/bank_reserves/model.py @@ -145,7 +145,7 @@ def __init__( # set x, y coords randomly within the grid x = self.random.randrange(self.width) y = self.random.randrange(self.height) - p = Person(i, (x, y), self, True, self.bank, self.rich_threshold) + p = Person(i, self, True, self.bank, self.rich_threshold) # place the Person object on the grid at coordinates (x, y) self.grid.place_agent(p, (x, y)) # add the Person object to the model schedule diff --git a/examples/bank_reserves/bank_reserves/random_walk.py b/examples/bank_reserves/bank_reserves/random_walk.py index 7e067881..884b24bd 100644 --- a/examples/bank_reserves/bank_reserves/random_walk.py +++ b/examples/bank_reserves/bank_reserves/random_walk.py @@ -24,7 +24,7 @@ class RandomWalker(mesa.Agent): # use a Moore neighborhood moore = True - def __init__(self, unique_id, pos, model, moore=True): + def __init__(self, unique_id, model, moore=True): """ grid: The MultiGrid object in which the agent lives. x: The agent's current x coordinate @@ -33,7 +33,6 @@ def __init__(self, unique_id, pos, model, moore=True): Otherwise, only up, down, left, right. """ super().__init__(unique_id, model) - self.pos = pos self.moore = moore def random_move(self):