Percolation in Java for Coursera algorithms I