gridlayout and game of life in separate class