super(500, 400, 1);
getBackground().setColor(Color.GRAY);
getBackground().fill();
questions = new ArrayList<Question>();
String questionText = "What country is this?";
GreenfootImage drawedImage = new GreenfootImage("France.png");
getBackground().drawImage(drawedImage, 170, 70);
ArrayList<Answer> answers = new ArrayList<Answer>();
answers.add(new Answer("Belgium", false));
answers.add(new Answer("Switzerland", false));
answers.add(new Answer("France", true));
answers.add(new Answer("Netherland", false));
Collections.shuffle(answers);
Question question = new Question(questionText, answers);
String explanation = "The correct answer was France. ";
question.setExplanation(explanation);
questions.add(question);
Hi, I have several 'questions,' like this. Basically, I am making a quiz where a picture of a country shows up and the player has to determine, among the displayed answers, what country it is. Right now, the France.png image is a background for each question but I would like to be able to have a different image for each question. How would I go about doing that? I don't want to create different actor classes for each image because I have over 40 question (and therefore images).
Thank you