Java implementation of percolation algorithms