System.out.println("Actually needed elements: " + ((w * h) / 8));
System.out.println("w * h: " + (w * h));
for (int y = 0; y < h; y++) {
for (int x = 0; x < w; x++) {
boolean bool = rand.randBool();
mat.set(bool, x, y);
System.out.print(bool ? "#" : ".");
}
System.out.println();
}