class sqType implements Comparator { int id; String name; color c; sqType(int _id, color _c, String _name) { id=_id; c=_c; name=_name; } int compare(Object a, Object b) { return ((sqType)a).name.compareTo(((sqType)b).name); } boolean equals(Object a) { return name.equals(((sqType)a).name); } } class typeManager { sqType[] types; color[] cols; int GRASS=0; int PAVED=1; int FOREST=2; int ROCKY=3; int SAND=4; int WATER=5; int DRAGON=6; int CAVE=7; int SWAMP=8; int SNOW=9; int ICE=10; typeManager() { types=new sqType[0]; cols=new color[11]; cols[GRASS]=color(0,255,0); cols[PAVED]=color(128,128,128); cols[FOREST]=color(0,128,0); cols[ROCKY]=color(180,180,180); cols[SAND]=color(180,180,0); cols[WATER]=color(0,0,180); cols[DRAGON]=color(50,50,50); cols[CAVE]=color(90,90,90); cols[SWAMP]=color(0,80,0); cols[SNOW]=color(255,255,255); cols[ICE]=color(200,200,230); } void addType(int _id,int type, String _name) { sqType[] tmp=types; types=new sqType[tmp.length+1]; for(int i=0;i