implementation by Yamen Ali for the game of life