This commit is contained in:
2026-09-15 09:25:25 +02:00
parent e0d532b848
commit 13edb7d2b6
18 changed files with 224 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class MyWorld here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class MyWorld extends World
{
/**
* Constructor for objects of class MyWorld.
*
*/
public MyWorld()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(400, 600, 1);
prepare();
}
/**
* Prepare the world for the start of the program.
* That is: create the initial objects and add them to the world.
*/
private void prepare()
{
Player player = new Player();
addObject(player,302,320);
}
}