public String toString(){
  StringBuilder sb=new StringBuilder();
  DoubleNode<IMove> node=moves.first();
  boolean endsWithComma=false;
  while (node != null) {
    sb.append(node.value() + ",");
    node=node.next();
    endsWithComma=true;
  }
  if (endsWithComma) {
    sb.deleteCharAt(sb.length() - 1);
  }
  return sb.toString();
}

public String toString ( ) { StringBuilder sb = new StringBuilder ( ) ; DoubleNode < IMove > node = moves . first ( ) ; boolean endsWithComma = false ; while ( node != null ) { sb . append ( node . value ( ) + "," ) ; node = node . next ( ) ; endsWithComma = true ; } if ( endsWithComma ) { sb . deleteCharAt ( sb . length ( ) - 1 ) ; } return sb . toString ( ) ; }
return solution as a string .
