From b6b7113f39511263dcd067333ff703b9c80e3ba9 Mon Sep 17 00:00:00 2001 From: Hal609 Date: Fri, 4 Oct 2024 17:01:07 +0100 Subject: [PATCH] Fix off-by-one error in defining the start and end of an XYEnvironment --- agents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agents.py b/agents.py index d29b0c382..d74522290 100644 --- a/agents.py +++ b/agents.py @@ -480,7 +480,7 @@ def __init__(self, width=10, height=10): self.observers = [] # Sets iteration start and end (no walls). self.x_start, self.y_start = (0, 0) - self.x_end, self.y_end = (self.width, self.height) + self.x_end, self.y_end = (self.width - 1, self.height - 1) perceptible_distance = 1