vanilla js game of life