Skip to content

Commit 8ca5c70

Browse files
committed
Change variable name to snake case
1 parent 5cc816a commit 8ca5c70

File tree

1 file changed

+4
-4
lines changed
  • mesa/examples/advanced/wolf_sheep

1 file changed

+4
-4
lines changed

mesa/examples/advanced/wolf_sheep/model.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ def __init__(
109109

110110
self.grid.add_property_layer(PropertyLayer.from_data("cliff", cliff_arr))
111111

112-
possibleCells = []
112+
possible_cells = []
113113
for cell in self.grid.all_cells.cells:
114114
if (
115115
cell.coordinate[0],
116116
cell.coordinate[1],
117117
) not in cliff_coord: # so we don't create wolf or sheep on cliff cells
118-
possibleCells.append(cell)
118+
possible_cells.append(cell)
119119

120120
# Create sheep:
121121
Sheep.create_agents(
@@ -124,7 +124,7 @@ def __init__(
124124
energy=self.rng.random((initial_sheep,)) * 2 * sheep_gain_from_food,
125125
p_reproduce=sheep_reproduce,
126126
energy_from_food=sheep_gain_from_food,
127-
cell=self.random.choices(possibleCells, k=initial_sheep),
127+
cell=self.random.choices(possible_cells, k=initial_sheep),
128128
)
129129
# Create Wolves:
130130
Wolf.create_agents(
@@ -133,7 +133,7 @@ def __init__(
133133
energy=self.rng.random((initial_wolves,)) * 2 * wolf_gain_from_food,
134134
p_reproduce=wolf_reproduce,
135135
energy_from_food=wolf_gain_from_food,
136-
cell=self.random.choices(possibleCells, k=initial_wolves),
136+
cell=self.random.choices(possible_cells, k=initial_wolves),
137137
)
138138

139139
# Create grass patches if enabled

0 commit comments

Comments
 (0)