#NEWLINE# def new_game( self , event ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# row = int ( self . row . getText ( ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# Window . alert ( 'Invalid number in rows' ) #NEWLINE# return #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# column = int ( self . column . getText ( ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# Window . alert ( 'Invalid number in columns' ) #NEWLINE# return #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# bomb = int ( self . bomb . getText ( ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# bomb = 0 #NEWLINE# #UNINDENT# if ( bomb >= ( row * row ) ) : #NEWLINE# #INDENT# Window . alert ( 'Number of bombs should not be greater than rows x columns.' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . menu . game . next_game ( ( row , column ) , bomb ) #NEWLINE# self . close_dialog ( )