From 8ca5c709ac72e53d2f2088c185bf7b21f5c74990 Mon Sep 17 00:00:00 2001 From: Muhammad Gema Akbar Date: Sun, 22 Dec 2024 20:43:28 +0100 Subject: [PATCH] Change variable name to snake case --- mesa/examples/advanced/wolf_sheep/model.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mesa/examples/advanced/wolf_sheep/model.py b/mesa/examples/advanced/wolf_sheep/model.py index 8a1ef5001c0..bffc891667c 100644 --- a/mesa/examples/advanced/wolf_sheep/model.py +++ b/mesa/examples/advanced/wolf_sheep/model.py @@ -109,13 +109,13 @@ def __init__( self.grid.add_property_layer(PropertyLayer.from_data("cliff", cliff_arr)) - possibleCells = [] + possible_cells = [] for cell in self.grid.all_cells.cells: if ( cell.coordinate[0], cell.coordinate[1], ) not in cliff_coord: # so we don't create wolf or sheep on cliff cells - possibleCells.append(cell) + possible_cells.append(cell) # Create sheep: Sheep.create_agents( @@ -124,7 +124,7 @@ def __init__( energy=self.rng.random((initial_sheep,)) * 2 * sheep_gain_from_food, p_reproduce=sheep_reproduce, energy_from_food=sheep_gain_from_food, - cell=self.random.choices(possibleCells, k=initial_sheep), + cell=self.random.choices(possible_cells, k=initial_sheep), ) # Create Wolves: Wolf.create_agents( @@ -133,7 +133,7 @@ def __init__( energy=self.rng.random((initial_wolves,)) * 2 * wolf_gain_from_food, p_reproduce=wolf_reproduce, energy_from_food=wolf_gain_from_food, - cell=self.random.choices(possibleCells, k=initial_wolves), + cell=self.random.choices(possible_cells, k=initial_wolves), ) # Create grass patches if enabled