Skip to content

Commit d57aa74

Browse files
pre-commit-ci[bot]quaquel
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e2eff63 commit d57aa74

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

examples/sugarscape_cg/sugarscape_cg/agents.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from mesa.experimental.cell_space import FixedAgent, CellAgent
66

7+
78
def get_distance(cell_1, cell_2):
89
"""Get the distance between two point
910

examples/sugarscape_cg/sugarscape_cg/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(self, width=50, height=50, initial_population=100, seed=None):
6363
sugar = self.random.randrange(6, 25)
6464
metabolism = self.random.randrange(2, 4)
6565
vision = self.random.randrange(1, 6)
66-
cell = self.grid[(x,y)]
66+
cell = self.grid[(x, y)]
6767
SsAgent(self, cell, sugar, metabolism, vision)
6868

6969
self.running = True

examples/sugarscape_g1mt/sugarscape_g1mt/model.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(
7171
self.running = True
7272

7373
# initiate mesa grid class
74-
self.grid =OrthogonalVonNeumannGrid((self.width, self.height), torus=False)
74+
self.grid = OrthogonalVonNeumannGrid((self.width, self.height), torus=False)
7575
# initiate datacollector
7676
self.datacollector = mesa.DataCollector(
7777
model_reporters={
@@ -95,7 +95,6 @@ def __init__(
9595
max_spice = spice_distribution[cell.coordinate]
9696
Resource(self, max_sugar, max_spice, cell)
9797

98-
9998
for _ in range(self.initial_population):
10099
# get agent position
101100
x = self.random.randrange(self.width)

examples/sugarscape_g1mt/sugarscape_g1mt/resource_agents.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from mesa.experimental.cell_space import FixedAgent
44

5+
56
class Resource(FixedAgent):
67
"""
78
Resource:

0 commit comments

Comments
 (0)