#NEWLINE# def fill_void_cells( self , cell ) : #NEWLINE# #INDENT# checked_cells = [ cell ] #NEWLINE# while ( len ( checked_cells ) > 0 ) : #NEWLINE# #INDENT# for cell in checked_cells [ : ] : #NEWLINE# #INDENT# checked_cells . remove ( cell ) #NEWLINE# if ( ( not self . mine_matrix [ cell . y ] [ cell . x ] . has_mine ) and ( self . mine_matrix [ cell . y ] [ cell . x ] . nearest_mine == 0 ) ) : #NEWLINE# #INDENT# for coord in [ [ ( - 1 ) , ( - 1 ) ] , [ ( - 1 ) , 0 ] , [ ( - 1 ) , 1 ] , [ 0 , ( - 1 ) ] , [ 0 , 1 ] , [ 1 , ( - 1 ) ] , [ 1 , 0 ] , [ 1 , 1 ] ] : #NEWLINE# #INDENT# ( _x , _y ) = coord #NEWLINE# if ( not self . coord_in_map ( ( cell . x + _x ) , ( cell . y + _y ) ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( not _y . mine_matrix [ ( cell . y + _y ) ] [ ( cell . x + _x ) ] . opened ) : #NEWLINE# #INDENT# self . mine_matrix [ ( cell . y + _y ) ] [ ( cell . x + _x ) ] . check_mine ( False ) #NEWLINE# checked_cells . append ( self . mine_matrix [ ( cell . y + _y ) ] [ ( cell . x + _x ) ] )