Life simulation in js