public static final String moveToUCIString(Move m){
  String ret=squareToString(m.from);
  ret+=squareToString(m.to);
switch (m.promoteTo) {
case Piece.WQUEEN:
case Piece.BQUEEN:
    ret+="q";
  break;
case Piece.WROOK:
case Piece.BROOK:
ret+="r";
break;
case Piece.WBISHOP:
case Piece.BBISHOP:
ret+="b";
break;
case Piece.WKNIGHT:
case Piece.BKNIGHT:
ret+="n";
break;
default :
break;
}
return ret;
}

public static final String moveToUCIString ( Move m ) { String ret = squareToString ( m . from ) ; ret += squareToString ( m . to ) ; switch ( m . promoteTo ) { case Piece . WQUEEN : case Piece . BQUEEN : ret += "q" ; break ; case Piece . WROOK : case Piece . BROOK : ret += "r" ; break ; case Piece . WBISHOP : case Piece . BBISHOP : ret += "b" ; break ; case Piece . WKNIGHT : case Piece . BKNIGHT : ret += "n" ; break ; default : break ; } return ret ; }
convert a move object to uci string format .
