Java class and test client for percolation algorithm.