#NEWLINE# def _remove_group( self , group ) : #NEWLINE# #INDENT# 'A private helper function to take a group off the board (due to capture),\n\t\tupdating group sets and liberties along the way\n\t\t' #NEWLINE# for ( x , y ) in group : #NEWLINE# #INDENT# self . board [ ( group , y ) ] = EMPTY #NEWLINE# #UNINDENT# for ( x , y ) in group : #NEWLINE# #INDENT# self . group_sets [ x ] [ y ] = set ( ) #NEWLINE# self . liberty_sets [ x ] [ y ] = set ( ) #NEWLINE# self . liberty_counts [ x ] [ y ] = 0 #NEWLINE# for ( nx , ny ) in self . _neighbors ( ( x , y ) ) : #NEWLINE# #INDENT# if ( self . board [ ( nx , ny ) ] == EMPTY ) : #NEWLINE# #INDENT# self . liberty_sets [ x ] [ y ] . add ( ( nx , ny ) ) #NEWLINE# self . liberty_counts [ x ] [ y ] += 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . liberty_sets [ nx ] [ ny ] . add ( ( x , y ) ) #NEWLINE# self . liberty_counts [ nx ] [ ny ] += 1