simple implementation of the game of life