I have two classes: Grid and Robot. And I call:
Grid g = new Grid(5,5);
Robot a = new Robot(1, 1, g);
Robot b = new Robot(2, 2, g);
Would it would be possible for me to share g between the two robot classes so that modifying g using a method called on Robot a, would it also modify Robot b in the same way?
Or is there another way to do this?