import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class Playground here. * * @author (your name) * @version (a version number or a date) */ public class Playground extends World { Segment[] segments; private int maxSegmentNum = 10; /** * Constructor for objects of class Playground. * */ public Playground() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(600, 400, 1); segments = new Segment[maxSegmentNum]; segments[0] = new Segment(); segments[1] = new Segment(); addObject(segments[0],100,100); segments[0].setLocation(segments[0].getX()+20, segments[0].getY()); } }

