Skip to content

Commit cdf2e53

Browse files
committed
feat: merge PR aimacode#1293
1 parent c96879f commit cdf2e53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

agents.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ def add_thing(self, thing, location=None, exclude_duplicate_class_items=False):
552552
def is_inbounds(self, location):
553553
"""Checks to make sure that the location is inbounds (within walls if we have walls)"""
554554
x, y = location
555-
return not (x < self.x_start or x > self.x_end or y < self.y_start or y > self.y_end)
555+
return not (x < self.x_start or x > self.x_end-1 or y < self.y_start or y > self.y_end-1)
556556

557557
def random_location_inbounds(self, exclude=None):
558558
"""Returns a random location that is inbounds (within walls if we have walls)"""

0 commit comments

Comments
 (0)