Cellular automata implemented in Java