for (int x = 0; x < 10; x++) {
for (int y = 0; y < 10; y++) {
if (map[y][x] != 0) {
switch (map[y][x]) {
case 1:
Polygon p2 = new Polygon();
p2.addPoint(x * 32, y * 32);
p2.addPoint((x * 32) + 32, y * 32);
p2.addPoint((x * 32) + 32, (y * 32) + 32);
p2.addPoint(x * 32, (y * 32) + 32);
original.add(p2);
//original.add(new Rectangle(x*32,y*32,33,33));
break;
case 2:
Polygon poly = new Polygon();
poly.addPoint(x * 32, y * 32);
poly.addPoint((x * 32) + 32, y * 32);
poly.addPoint(x * 32, (y * 32) + 32);
original.add(poly);
break;
case 3:
Circle ellipse = new Circle((x*32)+16,(y*32)+32,16,16);
original.add(ellipse);
break;
case 4:
Polygon p = new Polygon();
p.addPoint((x * 32) + 32, (y * 32));
p.addPoint((x * 32) + 32, (y * 32)+32);
p.addPoint(x * 32, (y * 32) + 32);
original.add(p);
break;
case 5:
Polygon p3 = new Polygon();
p3.addPoint((x * 32), (y * 32));
p3.addPoint((x * 32) + 32, (y * 32));
p3.addPoint((x * 32) + 32, (y * 32)+32);
original.add(p3);
break;
case 6:
Polygon p4 = new Polygon();
p4.addPoint((x * 32), (y * 32));
p4.addPoint((x * 32) + 32, (y * 32));
p4.addPoint((x * 32), (y * 32)+32);
original.add(p4);
break;
}
// Polygon poly = new Polygon();
// poly.addPoint(x * 64, y * 32);