public boolean isHasMoveToPosition(Position pos, ChessBoard board) {
        Iterator<Move> it = getPossibleMoves(board).iterator();
        while (it.hasNext()) {
            if (it.next().getEndPosition() == pos) {
                return true;
            }
        }
        return false;
    }