import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Platform here.
*
* @author (Allen)
* @version (10/3/16)
*/
public abstract class Platform extends World
{
String[] map;
/**
* Constructor for objects of class Platform.
*
*/
public Platform()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(800, 600, 1);
setFields();
for (int i=0; i<map.length; i++) for (int j=0; j<map[i].length(); j++)
{
int kind = "abcde".indexOf(""+map[i].charAt(j));
if (kind < 0) continue;
Actor actor = null;
if (kind == 0) actor = new Job();
if (kind == 1) actor = new IoS();
if (kind == 2) actor = new GrassOne();
if (kind == 3) actor = new GrassTwo();
if (kind == 4) actor = new BoB();
addObject(actor, 16+j*32, 16+i*32);
}
}
public void setFields() {}
public void nextLevel() {}
}
