private String canClaimDraw(Position pos,long[] posHashList,int posHashListSize,Move move){
  String drawStr="";
  if (Search.canClaimDraw50(pos)) {
    drawStr="draw 50";
  }
 else   if (Search.canClaimDrawRep(pos,posHashList,posHashListSize,posHashListSize)) {
    drawStr="draw rep";
  }
 else {
    String strMove=TextIO.moveToString(pos,move,false);
    posHashList[posHashListSize++]=pos.zobristHash();
    UndoInfo ui=new UndoInfo();
    pos.makeMove(move,ui);
    if (Search.canClaimDraw50(pos)) {
      drawStr="draw 50 " + strMove;
    }
 else     if (Search.canClaimDrawRep(pos,posHashList,posHashListSize,posHashListSize)) {
      drawStr="draw rep " + strMove;
    }
    pos.unMakeMove(move,ui);
  }
  return drawStr;
}

private String canClaimDraw ( Position pos , long [ ] posHashList , int posHashListSize , Move move ) { String drawStr = "" ; if ( Search . canClaimDraw50 ( pos ) ) { drawStr = "draw 50" ; } else if ( Search . canClaimDrawRep ( pos , posHashList , posHashListSize , posHashListSize ) ) { drawStr = "draw rep" ; } else { String strMove = TextIO . moveToString ( pos , move , false ) ; posHashList [ posHashListSize ++ ] = pos . zobristHash ( ) ; UndoInfo ui = new UndoInfo ( ) ; pos . makeMove ( move , ui ) ; if ( Search . canClaimDraw50 ( pos ) ) { drawStr = "draw 50 " + strMove ; } else if ( Search . canClaimDrawRep ( pos , posHashList , posHashListSize , posHashListSize ) ) { drawStr = "draw rep " + strMove ; } pos . unMakeMove ( move , ui ) ; } return drawStr ; }
check if a draw claim is allowed , possibly after playing " move " .
