Implementation of conway's game of life and its impartial variant