#NEWLINE# def is_eyeish( self , position , owner ) : #NEWLINE# #INDENT# "returns whether the position is empty and is surrounded by all stones of 'owner'\n\t\t" #NEWLINE# ( x , y ) = position #NEWLINE# if ( self . board [ ( x , y ) ] != EMPTY ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# for ( nx , ny ) in self . _neighbors ( position ) : #NEWLINE# #INDENT# if ( self . board [ ( position , ny ) ] != owner ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# return True