Game logic

def start(self):
        """
        Game logic
        """
        self.initGrid()
        self.win.clear()
        self.state = 'running'

        while self.state == 'running':
            if self.hud:
                self.drawHUD()
            self.drawGrid()
            self.nextGen()
            sleep(self.rate)
            # Has life evolved over 2 generations
            # Better stopping condition needed
            if self.change_gen[0] == self.change_gen[2]:
                self.state = 'stopped'
                break
            key = self.win.getch()
            if key == ord('q'):
                exit()
            if key == ord('r'):
                self.restart
            if key in [ord('p'), ord('s')]:
                self.state = 'paused'
                while self.state == 'paused':
                    key = self.win.getch()
                    if key == ord('q'):
                        exit()
                    if key == ord('r'):
                        self.state = 'running'
                        self.restart
                    if key in [ord('s'), ord('p')]:
                        self.state = 'running'
        self.end()