conways game of life core functionality