import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class GameOverWorld here. * * @author (your name) * @version (a version number or a date) */ public class EndWorld extends World { /** * Constructor for objects of class GameOverWorld. * */ public EndWorld(String pSieger) { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(600, 400, 1); showText("GAME OVER", 300, 60); showText("the winner is " + pSieger, 300, 200); showText("Drücke R für einen Neustart", 300, 220); } public void act(){ if (Greenfoot.isKeyDown("r")){ Greenfoot.setWorld(new StartWorld()); } } }