Skip to content

Commit

Permalink
Fix error on is_cliff
Browse files Browse the repository at this point in the history
  • Loading branch information
mgemaakbar committed Dec 23, 2024
1 parent 8b3a415 commit 6c83223
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesa/examples/advanced/wolf_sheep/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def step(self):
"""Execute one step of the animal's behavior."""
# Move to random neighboring cell
self.move()
is_cliff = self.grid.model.cliff.data[self.cell.coordinate[0]][
is_cliff = self.model.grid.cliff.data[self.cell.coordinate[0]][
self.cell.coordinate[1]
]
if is_cliff: # if the cell is a cliff, then the animal dies
Expand Down

0 comments on commit 6c83223

Please sign in to comment.