Cellural Automaton in Scala