I modified the Agent6 class to change the name by removing grid.
Then I made the modification to ObjectGrid2D and ran the program twice with the alternate coordinates.
X45Y20 gives the result I expected, X20Y45 has the shape I expected but does not access the grid fully.
These two pictures are the results with the coordinates in the picture file name.
mySpace = new ObjectGrid2D(gridWidth, gridHeight);
At the present time I can obtain the results I am looking for but I have no idea as to why the coordinates are transposed.
Agent6 is a work in progress as I am going to add agent id then when there are multiple agents each family will have a different colour and I want to have a stop when any agent becomes blocked.
Thank you for your help,
Stewart.
Win 10, Java 1.8_162, Eclipse Oxygen 2. Intel i5 8400.
|