#NEWLINE# def boardToString( self , margins = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# '\n        return a string representation of the current board.\n        ' #NEWLINE# b = self . board #NEWLINE# rg = range ( b . size ( ) ) #NEWLINE# left = ( ' ' * margins . get ( 'left' , 0 ) ) #NEWLINE# s = '\n' . join ( [ ( left + ' ' . join ( [ self . getCellStr ( x , y ) for x in rg ] ) ) for y in rg ] ) #NEWLINE# return s