Java implementation of Flood It