@property<EOL><INDENT>def end(self):<DEDENT>
if self.loop:<EOL><INDENT>self.restart<EOL>return<EOL><DEDENT>self.addstr(<NUM_LIT:2>, self.x_grid / <NUM_LIT:2> - <NUM_LIT:4>, "<STR_LIT>", <NUM_LIT:7>)<EOL>if self.hud:<EOL><INDENT>self.addstr(<NUM_LIT:2>, self.x_pad + <NUM_LIT>, len(self.grid), <NUM_LIT:5>)<EOL>self.addstr(<NUM_LIT:3>, self.x_pad + <NUM_LIT>, self.current_gen, <NUM_LIT:5>)<EOL><DEDENT>if self.test:<EOL><INDENT>exit()<EOL><DEDENT>while self.state == '<STR_LIT>':<EOL><INDENT>key = self.win.getch()<EOL>if key == ord('<STR_LIT:q>'):<EOL><INDENT>exit()<EOL><DEDENT>if key in [ord('<STR_LIT:s>'), ord('<STR_LIT:r>')]:<EOL><INDENT>self.restart<EOL><DEDENT><DEDENT>
Game Finished - Restart or Quit