this is my code.The first map works and makes the map.The second needs to make the characters on the map.I'm not really sure what i'm doing though.
import greenfoot.*;
public abstract class Level extends World
{
String[] map,map2;
public Level()
{
super(576, 576, 1);
//setBackground(new GreenfootImage("StartScreen.png")); // Splash Screen
setFields();
for (int i=0; i<map.length; i++) for (int j=0; j<map[i].length(); j++)
{
int kind = "ABCDEFGHIJKLMNOPQRSTU".indexOf(""+map[i].charAt(j));
if (kind < 0) continue;
Actor actor = null;
if (kind == 0) actor = new grass(); //A
if (kind == 1) actor = new CastleA(); //B
if (kind == 2) actor = new CastleB(); //C
if (kind == 3) actor = new CastleC(); //D
if (kind == 4) actor = new CastleD(); //E
if (kind == 5) actor = new PathA(); //F
if (kind == 6) actor = new PathB(); //G
if (kind == 7) actor = new PathC(); //H
if (kind == 8) actor = new RiverA(); //I
if (kind == 9) actor = new RiverB(); //J
if (kind == 10) actor = new RiverL(); //K
if (kind == 11) actor = new MountA(); //L
if (kind == 12) actor = new Bridge(); //M
if (kind == 13) actor = new BridgeB(); //N
if (kind == 14) actor = new PathD(); //O
if (kind == 15) actor = new MountB(); //P
if (kind == 16) actor = new MountC(); //Q
if (kind == 17) actor = new PathL(); //R
if (kind == 18) actor = new tree(); //S
if (kind == 19) actor = new Anri(); //T
if (kind == 20) actor = new Maxx(); //U
addObject(actor, 24+j*48, 24+i*48);
}
//setFields();
/*for (int i2=0; i2<map2.length; i2++) for (int j2=0; j2<map2[i2].length(); j2++)
{
int kind2 = "T".indexOf(""+map2[i2].charAt(j2));
Actor actor2 = null;
if (kind2 == 1) actor2 = new Anri(); //T
addObject(actor2, 24+j2*48, 24+i2*48);
}*/
}
public void setFields() {}
public void nextLevel() {}
}


