I want to have my main Actor intersect (or hit) other objects that have populated my world. How can I do this?
// with an instance field final String startPosition = "aaaaaaaaabcbdbcaadbccdbaaaaaaaaa"; // in the constructor (or a method it calls) for (int j=0; j<getHeight(); j++) for (int k=0; k<getWidth(); k++) { char c = startPosition.charAt(j*getWidth()+k); switch ("abcd".indexOf(c)) { case 0: addObject(new ObjA(), j, k); break; case 1: addObject(new ObjB(), j, k); break; case 2: addObject(new ObjC(), j, k); break; case 3: addObject(new ObjD(), j, k); break; } }