#NEWLINE# def copy( self ) : #NEWLINE# #INDENT# 'get a copy of this Game state\n\t\t' #NEWLINE# other = GameState ( self . size ) #NEWLINE# other . board = self . board . copy ( ) #NEWLINE# other . turns_played = self . turns_played #NEWLINE# other . current_player = self . current_player #NEWLINE# other . ko = self . ko #NEWLINE# other . history = self . history #NEWLINE# other . num_black_prisoners = self . num_black_prisoners #NEWLINE# other . num_white_prisoners = self . num_white_prisoners #NEWLINE# for x in range ( self . size ) : #NEWLINE# #INDENT# for y in range ( self . size ) : #NEWLINE# #INDENT# other . group_sets [ x ] [ y ] = set ( self . group_sets [ x ] [ y ] ) #NEWLINE# other . liberty_sets [ x ] [ y ] = set ( self . liberty_sets [ x ] [ y ] ) #NEWLINE# #UNINDENT# #UNINDENT# other . liberty_counts = self . liberty_counts . copy ( ) #NEWLINE# return other