I tried using apple class but it didnt work."Apple result = new Score();" this line has an error.
public EndScreenWorld(double vscore) {
super("", 800, 600, new Point2D(0.0, 0.0), 10);
gameMusic = new GreenfootSound("endMenu.wav");
Apple result = new Score();
addObject(result, 400, 320);
result.setImage( new GreenfootImage("You finished with a score of " + (int)vscore + ".", 40, Color.WHITE, Color.BLACK, Color.YELLOW));
Score feedback = new Score();
addObject(feedback, 400, 380);
if (vscore >= 25 && vscore <= 75) {
String ranking = new String("intermediate player");
feedback.setImage( new GreenfootImage("You are a " + ranking + ".", 40, Color.BLUE, Color.BLACK, Color.YELLOW));
}
if (vscore < 25) {
String ranking = new String("novice player");
feedback.setImage( new GreenfootImage("You are a " + ranking + ".", 40, Color.BLUE, Color.BLACK, Color.YELLOW));
}
if (vscore > 75) {
String ranking = new String();
feedback.setImage( new GreenfootImage("You are a " + ranking + ".", 40, Color.BLUE, Color.BLACK, Color.YELLOW));
}
}
