i haven't started the code but the idea is that a random object will appear on my screen and the user will have to input the "name" of the object in order to get rid of it. how do i create an array list for the images?
i haven't started the code but the idea is that a random object will appear on my screen and the user will have to input the "name" of the object in order to get rid of it. how do i create an array list for the images?
I would think your list of images would be of a fixed length for any single run of the scenario (meaning you could change it between compilations). Therefore an array (as opposed to an ArrayList) would suffice. Also, you can probably kill two birds with one stone by using an array of String type objects instead of GreenfootImage objects. That way, the String values can be the image filename as well as be used to compare to the user's input.