Optimizing percolation

Optimized random generator in Java
Reduced random number generation steps