int[][] result = new int[getWidth()][getHeight()];
for (int x = 0; x < getWidth(); ++x) {
Arrays.fill(result[x], 0);
}
for (HeyawakeRoom room : rooms) {
Recti rect = room.getRoomRect();
for (int x = rect.x; x < rect.x + rect.w; ++x) {
for (int y = rect.y; y < rect.y + rect.h; ++y) {
result[x][y]++;
}
}