Skip to content

Commit 6c83223

Browse files
committed
Fix error on is_cliff
1 parent 8b3a415 commit 6c83223

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mesa/examples/advanced/wolf_sheep/agents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def step(self):
4040
"""Execute one step of the animal's behavior."""
4141
# Move to random neighboring cell
4242
self.move()
43-
is_cliff = self.grid.model.cliff.data[self.cell.coordinate[0]][
43+
is_cliff = self.model.grid.cliff.data[self.cell.coordinate[0]][
4444
self.cell.coordinate[1]
4545
]
4646
if is_cliff: # if the cell is a cliff, then the animal dies

0 commit comments

Comments
 (0)