One-dimesional cellular automaton implemented in Javascript