Programming exercise for the game of life