break;
default:
throw new RuntimeException("Illegal map character: " + ch);
}
RealmCell cell = new RealmCell();
cell.setTile(new Tile(tileClass, tileClass.getYOffset() + heightNoise));
cell.setThing(thing);
row[j] = cell;
}
rowList.add(row);
}
int numRows = rowList.size();
int numCols = rowList.get(0).length;
RealmMap realmMap = new RealmMap(numRows, numCols);
for (int i = 0; i < numRows; i++) {
for (int j = 0; j < numCols; j++) {
RealmCell cell = rowList.get(i)[j];
realmMap.setCell(i, j, cell);
// Add a little more interest to the height map. This is just temporary.
// double distance = Math.sqrt(((30 - i) * (30 - i)) + ((30 - j) * (30 - j)));
// int offset = (int) Math.min(distance - 20.0, 0) * 5;