further generalization

created a GameOfLife class that encapsulates all other details