public String prettyPrint ( ) { String result = "" ; for ( int j = 0 ; j < 3 ; j ++ ) { result += new String ( board [ j ] ) + "\n" ; } result = result . replace ( ' ' , ' ' ) ; return result ; }
Pretty prints the board as 3 lines of characters with a space for the empty square .